question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix GraphQL Playground DX/UX Issues

See original GitHub issue

When we upgraded to Apollo Server 3, we went with the default switch to Apollo Sandbox replacing the old built-in GraphQL Playground.

This has led to a whole lot of DX/UX issues for people upgrading, for several reasons:

  • You need to specifically set up CORS to allow the GraphQL server to respond to requests from the Apollo Sandbox domain (related issue: #6795)
  • Apollo Sandbox does’t work in Safari
  • You need to specifically configure cookie behaviour in Apollo Sandbox
  • When you jump from signed-in in the Admin UI to Apollo Sandbox, you’re signed out, and need to sign in manually with the auth mutation

… and none of this is really intuitive, documented, or guided. It’s a real step backwards for Keystone, and the tradeoffs for the new Sandbox UX (once it’s all actually set up and working) really don’t seem worth it.

Spec below edited after conversation with @mitchellhamilton (below) where we made a call on the config spec

To fix this and roll it back to a better default experience, I propose we introduce a new config.graphql.playground: true | false | 'sandbox' = process.env.NODE_ENV === 'production' config option where:

  • true adds the old Playground config (instructions)
  • false disables the playground (i.e we pass no plugin config to ApolloServer)
  • 'apollo' turns on the new Apollo Sandbox behaviour

Users can also set the playground option to 'apollo' and use config.graphql.apolloConfig directly to control the behaviour themselves.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jesstelfordcommented, Oct 22, 2021
0reactions
jesstelfordcommented, Oct 26, 2021

Reopening this because we missed the request. credentials setting: https://github.com/keystonejs/keystone/pull/6824#pullrequestreview-788842476

Read more comments on GitHub >

github_iconTop Results From Across the Web

GraphQL Playground Server Cannot Be Reached Running ...
I've uploaded my current code to my repositories under GraphQL-Node. Please provide a gif or image of the issue for a quicker response/fix....
Read more >
GraphQL Playground - Apollo GraphQL Docs
GraphQL Playground is a graphical, interactive, in-browser GraphQL IDE, created by Prisma and based on GraphiQL. In development, Apollo Server enables ...
Read more >
GraphQL playground broken: "Issues processing last ...
To fix it, just clear your local storage. With the following in the console:.
Read more >
Five Common Problems in GraphQL Apps (And How to Fix ...
Five Common Problems in GraphQL Apps (And How to Fix Them) · Problem: Schema Duplication · Problem: Server/Client Data Mismatch · Problem: ...
Read more >
E-commerce with #Directus and #Nextjs - [03] - Fix ... - YouTube
E-commerce with #Directus and #Nextjs - [03] - Fix No Access Issue, DB Update, GraphQL Playground.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found