
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGreat that you solved it! For anyone else running into this issue, here's what's likely happening:
When you add a new field to your Sanity schema, you need to redeploy your GraphQL endpoint by running:
sanity graphql deployThis is a separate step from deploying your Studio or rebuilding your Gatsby site. The GraphQL API is generated from your schema, so every time you make schema changes (adding/removing fields, changing types, etc.), you need to redeploy it.
Why this matters for Gatsby:
The gatsby-source-sanity plugin works by first fetching the GraphQL Schema Definitions from Sanity's deployed GraphQL API, then streaming all accessible documents to Gatsby's in-memory datastore. Without redeploying the GraphQL API, the plugin won't know about your new field.
Common workflow when adding new fields:
siteURL field)sanity graphql deploy from your Studio directoryPro tip: You can use sanity graphql deploy --dry-run to validate your schema changes before deploying, which will catch any breaking changes without actually deploying.
Note: While gatsby-source-sanity uses the deployed GraphQL API for schema definitions, Sanity also supports querying directly with GROQ if you prefer that approach. But if you're using the standard GraphQL setup with Gatsby, the sanity graphql deploy step is essential after schema changes.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store