These are the docs for v2, which has an open maintenance window until April 1, 2021. View the v3 docs.

  • Gatsbyjs.com
    Gatsbyjs.com
  • Gatsby Cloud
    Gatsby Cloud
  • Support
    Support
  • Contact
    Contact
  • Log in
    Log in
docs
    • Tutorial
      Tutorial
    • How-to Guides
      How-to Guides
    • Reference
      Reference
    • Conceptual Guide
      Conceptual Guide
    • Quick Start
      Quick Start
    • v2

      • v3

        v3

      • v2

        v2

      • v1

        v1

DocumentationReference Guides
Docs

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
  • Accessibility Statement
  • Code of Conduct
  • Logo & Assets
  • Privacy Policy
  Docs
  • Reference
    • Overview
    • Gatsby Project Structure
    • Gatsby CLI commands
    • Gatsby Link API
    • Gatsby Image API
    • Creating Routes
    • File System Route API
    • Overview
    • Gatsby Config APIs
    • Gatsby Node APIs
    • Additional Guides 5
    • Overview
    • GraphQL Query API
    • GraphQL Query Options Reference
    • Customizing the GraphQL Schema
    • GraphQL Fragments
    • Additional Guides 2