Part of #1195 (Track 2).
Goal
Embed a live, in-browser GraphQL explorer in docs2, pointed at a public Mina devnet endpoint. Read-only. Lets developers (and agents that drive a real browser) try queries against real chain data without spinning up a node or copying queries elsewhere.
Why live, not mocked
A live devnet endpoint is more useful than a mock and avoids the maintenance cost of keeping mocks aligned with the schema. The tradeoff is the playground breaking when devnet is down — acceptable for a dev tool. If devnet rate-limits or ToS become a problem, add a thin Cloudflare Worker proxy with caching as a follow-up.
Approach
- New page
docs/integrate/graphql-api/playground.mdx.
- Use
@graphiql/react (or graphql-playground-react if smaller bundle) inside an MDX page. Both are React, both work in Docusaurus.
- Default endpoint: a public devnet GraphQL URL (decide which one — there are a few; pick one operations is happy to keep up).
- Read-only: hide or disable the mutation tab, or proxy through a worker that rejects mutations. Simpler: client-side filter on the operation kind before the request fires.
- Pre-populate the query editor with a useful starter query (e.g.
bestChain(maxLength: 1) { stateHash creator }).
- Pin a small CSS fix so the GraphiQL component plays nicely with Docusaurus's layout (full-height container).
Acceptance criteria
Depends on
Endpoint decision — needs ops sign-off on which devnet host is OK to advertise as "the playground endpoint." Tag the relevant team in the PR.
Part of #1195 (Track 2).
Goal
Embed a live, in-browser GraphQL explorer in docs2, pointed at a public Mina devnet endpoint. Read-only. Lets developers (and agents that drive a real browser) try queries against real chain data without spinning up a node or copying queries elsewhere.
Why live, not mocked
A live devnet endpoint is more useful than a mock and avoids the maintenance cost of keeping mocks aligned with the schema. The tradeoff is the playground breaking when devnet is down — acceptable for a dev tool. If devnet rate-limits or ToS become a problem, add a thin Cloudflare Worker proxy with caching as a follow-up.
Approach
docs/integrate/graphql-api/playground.mdx.@graphiql/react(orgraphql-playground-reactif smaller bundle) inside an MDX page. Both are React, both work in Docusaurus.bestChain(maxLength: 1) { stateHash creator }).Acceptance criteria
Depends on
Endpoint decision — needs ops sign-off on which devnet host is OK to advertise as "the playground endpoint." Tag the relevant team in the PR.