Skip to content

feat(graphql): replace deprecated graphql-playground with graphiql#16724

Open
Patrickroelofs wants to merge 7 commits into
payloadcms:mainfrom
Patrickroelofs:feature/replace-graphqlplayground-with-graphiql
Open

feat(graphql): replace deprecated graphql-playground with graphiql#16724
Patrickroelofs wants to merge 7 commits into
payloadcms:mainfrom
Patrickroelofs:feature/replace-graphqlplayground-with-graphiql

Conversation

@Patrickroelofs
Copy link
Copy Markdown
Contributor

@Patrickroelofs Patrickroelofs commented May 22, 2026

What?

This PR replaces the deprecated graphql-playground interface with the modern graphiql IDE for exploring and testing the GraphQL API.

Why?

graphql-playground was officially retired by the GraphQL Foundation in 2020 and has been unmaintained for several years, which introduces dependency drift and potential security vulnerabilities. graphql/graphql-playground#1143 graphiql is the actively maintained, official standard. It offers a more modern developer experience, better accessibility, and up-to-date dependencies.

Besides that graphql-playground has severe issues in firefox like autocomplete helpers not dissapearing
Screenshot 2026-05-26 at 13 29 29
graphql/graphql-playground#1429

How?

  • Removed the old graphql-playground dependencies and related rendering code.
  • Added graphiql as the new interactive GraphQL IDE.
  • Updated the route handler serving the GraphQL UI to render the new GraphiQL interface while maintaining the same endpoint path.
  • Added tests to cover non-existing tests for the playground
  • I've kept "graphql playground" naming in docs and routes and only updated to "GraphiQL IDE" where necessary. Playground is such a generic term i feel it fits better and is more descriptive. It also makes it so this has no breaking changes.

Disclosure

  • Github Copilot was used during the development of this replacement

Validations

  • Tested manually in a latest version payload application and the monorepo dev-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants