See what's launched

The next gen Gatsby is here Performance, developer velocity, and scaling to meet Enterprise needs - See what’s launched

Querying Data

Once data is pulled into Gatsby, your pages and components specify what data they access through GraphQL queries.

 Main Guides 4

Page queries

Pages can specify exactly the data they require from sources via GraphQL queries.

Component queries

Components can specify exactly the data they require from sources via GraphQL queries, though they cannot use variables in the query.

Explore data (GraphiQL)

GraphiQL is a query IDE available in local development. It shows you the data that a GraphQL query returns alongside that query. Most Gatsby users compose their queries in GraphiQL and then cut-and-paste them into their Javascript files.

Gatsby without GraphQL

If you find GraphQL confusing, or just want to simplify things, it’s possible to use an “unstructured data” approach -- no GraphQL required.

 Additional Guides 1

  • Query for data in a component with the StaticQuery component
© 2022 Gatsby, Inc.