You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider moving the "Fragments" section of the GraphQL API to its own page(s). Alternately, remove these sections, since their content is already covered under the Gatsby Image API.
Motivation
The "Fragments" section contains GraphQL fragments for two plugins: Contentful and ImageSharp. It makes them hard to find when they're hidden at the bottom of the GraphQL API.
Additionally, this requires us to pull in a one-time use MDX component, <GraphQLApiQuery>, which can interfere with translated docs. There are other work-arounds for this, like making the component global
Furthermore, the static-query used is included in the main site bundle for some reason, resulting in significant bloat for the site (#21470). 10% of our main website bundle comes from these queries! Moving them to page queries, or removing them alltogether, alleviates this.
Steps to resolve this issue
Create a new overview page "GraphQL Fragments" that introduces the concept of fragments and links to the two pages below.
Create two new pages "Contentful Fragments" and "ImageSharp Fragments", each pulling in the APIs for the specific plugin using the new template-api defined in feat(www): Convert API pages to MDX #20763
tesseralis
changed the title
(docs) Consider moving fragments section of GraphQL API to their own page
(docs) Consider moving/removing fragments section of GraphQL API
Feb 17, 2020
Summary
Consider moving the "Fragments" section of the GraphQL API to its own page(s). Alternately, remove these sections, since their content is already covered under the Gatsby Image API.
Motivation
The "Fragments" section contains GraphQL fragments for two plugins: Contentful and ImageSharp. It makes them hard to find when they're hidden at the bottom of the GraphQL API.
Additionally, this requires us to pull in a one-time use MDX component,
<GraphQLApiQuery>
, which can interfere with translated docs. There are other work-arounds for this, like making the component globalFurthermore, the static-query used is included in the main site bundle for some reason, resulting in significant bloat for the site (#21470). 10% of our main website bundle comes from these queries! Moving them to page queries, or removing them alltogether, alleviates this.
Steps to resolve this issue
template-api
defined in feat(www): Convert API pages to MDX #20763Related Issues
Part of: #20795
Depends on: #20763
The text was updated successfully, but these errors were encountered: