Finding the GraphQL Playground URL in Sanity's documentation

12 replies
Last updated: May 29, 2020
On what URL do I find the graphql playground? I know how to deploy it, but can’t find any reference to it
AI Update

The GraphQL endpoint URL is the playground - when you visit it in your browser, it automatically displays the GraphQL playground interface!

The URL format is:

https://<project-id>.api.sanity.io/v<api-version>/graphql/<dataset>/<tag>

For most projects, this looks like:

https://<project-id>.api.sanity.io/v2024-01-01/graphql/<dataset>/default

Where:

  • <project-id> is your Sanity project ID
  • <dataset> is your dataset name (usually production)
  • <tag> is typically default (unless you've deployed tagged endpoints)

So the same URL serves double duty - visit it in your browser to get the interactive playground, or use it as the endpoint when querying from code. You can find more details in the GraphQL playground section of the docs.

Here you go, link and screenshot. 🙂
https://www.sanity.io/docs/graphql#the-playground-e77f47b5bc78
Edit:
<tag>
in my case is set to "default"
user M
That’s the endpoints to query against right?
Not the playground?
Ahhhhhh
It's both, it works as the endpoint in code and the playground on the browser. Not sure of the specifics 😅
I figured it’d be at like /__graphiql or something
Might be best to stick that in the docs
Also – how did you know the
default
tag? I don’t even know what a tag is?
Damn if I’d just scrolled up a touch!
Thanks for your help 👍
You're welcome! 👍

Sanity – Build the way you think, not the way your CMS thinks

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.

Was this answer helpful?