Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

GraphQL Data Layer

APIs for querying your data (PageQuery, StaticQuery, Fragments) and specifying your GraphQL schema (schema customization).

 Main Guides 4

GraphQL Query API

Covers PageQuery, StaticQuery and the useStaticQuery hook.

GraphQL Query Options Reference

Covers sort, filter, skip, limit, formatting dates and excerpts, query variables, grouping, fragments, aliasing, and conditionals.

Customizing the GraphQL Schema

In situations when you either want to explicitly define the data shape, or add custom functionality to the query layer, you can override Gatsby's auto-inferred schema.

GraphQL Fragments

Fragments allow you to reuse parts of GraphQL queries. It also allows you to split up complex queries into smaller, easier to understand components.

 Additional Guides 2

  • Node Model
  • Node Interface
© 2023 Gatsby, Inc.