diff --git a/docs/docs/graphql-api.md b/docs/docs/graphql-api.md index d64f64ec91e0e..6b8f64fbf54ad 100644 --- a/docs/docs/graphql-api.md +++ b/docs/docs/graphql-api.md @@ -3,9 +3,6 @@ title: GraphQL API tableOfContentsDepth: 2 --- -import { GraphqlApiQuery } from "../../www/src/components/api-reference/doc-static-queries" -import APIReference from "../../www/src/components/api-reference" - A great advantage of Gatsby is a built-in data layer that combines all data sources you configure. Data is collected at [build time](/docs/glossary#build) and automatically assembled into a [schema](/docs/glossary#schema) that defines how data can be queried throughout your site. This doc serves as a reference for GraphQL features built into Gatsby, including methods for querying and sourcing data, and customizing GraphQL for your site's needs. @@ -227,39 +224,9 @@ Fragments allow you to reuse parts of GraphQL queries. They also allow you to sp For more information, check out the docs guide on [using fragments in Gatsby](/docs/using-graphql-fragments/). -### List of Gatsby fragments - -Some fragments come included in Gatsby plugins, such as fragments for returning optimized image data in various formats with `gatsby-image` and `gatsby-transformer-sharp`, or data fragments with `gatsby-source-contentful`. - -#### Image sharp fragments - -The following fragments are available in any site with `gatsby-transformer-sharp` installed and included in your `gatsby-config.js`. - -Information on querying with these fragments is also listed in-depth in the [Gatsby image API docs](/docs/gatsby-image/), including options like resizing and recoloring. - - - {data => ( - - )} - - -#### Contentful fragments - -The following fragments are available in any site with `gatsby-source-contentful` installed and included in your `gatsby-config.js`. These fragments generally mirror the fragments outlined in the `gatsby-transformer-sharp` package. - - - {data => ( - - )} - +### Gatsby fragments -**Note**: the above fragments are from officially maintained Gatsby starters; other plugins like `gatsby-source-datocms` and `gatsby-source-sanity` ship with fragments of their own. A list of those fragments can be found in the [`gatsby-image` README](/packages/gatsby-image#fragments). +Some fragments come included in Gatsby plugins, such as fragments for returning optimized image data in various formats with `gatsby-image` and `gatsby-transformer-sharp`, or data fragments with `gatsby-source-contentful`. For more information on what plugins include fragments, see the [`gatsby-image` README](/packages/gatsby-image#fragments). ## Advanced customizations diff --git a/packages/gatsby-image/README.md b/packages/gatsby-image/README.md index 31d9db6bec924..75df3473ec890 100644 --- a/packages/gatsby-image/README.md +++ b/packages/gatsby-image/README.md @@ -253,8 +253,6 @@ Their fragments are: - `GatsbySanityImageFluid` - `GatsbySanityImageFluid_noBase64` -_Links to source code for fragment fields of official Gatsby plugins can be found in the [Gatsby GraphQL API](/docs/graphql-api/)_ - If you don't want to use the blur-up effect, choose the fragment with `noBase64` at the end. If you want to use the traced placeholder SVGs, choose the fragment with `tracedSVG` at the end. @@ -263,6 +261,9 @@ If you want to automatically use WebP images when the browser supports the file format, use the `withWebp` fragments. If the browser doesn't support WebP, `gatsby-image` will fall back to the default image format. +For more information about these options, please see the +[Gatsby Image API](/docs/gatsby-image/#image-query-fragments). + _Please see the [gatsby-plugin-sharp](/packages/gatsby-plugin-sharp/#tracedsvg) documentation for more information on `tracedSVG` and its configuration diff --git a/www/src/components/api-reference/doc-static-queries.js b/www/src/components/api-reference/doc-static-queries.js deleted file mode 100644 index 18d16e97d3394..0000000000000 --- a/www/src/components/api-reference/doc-static-queries.js +++ /dev/null @@ -1,52 +0,0 @@ -import React from "react" -import { graphql, StaticQuery } from "gatsby" - -export const DocumentationAndApiFragment = graphql` - fragment DocFragment on DocumentationJs { - availableIn - codeLocation { - start { - line - } - end { - line - } - } - ...DocumentationFragment - } -` - -// data for the graphql-api page -export const GraphqlApiQuery = ({ children }) => ( - children(data)} - /> -)