-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting graphql-playground-react to work when offline #1734
Conversation
@penx: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Another option, once graphql/graphql-playground#845 is in @apollographql/graphql-playground-html, is to rely on the parent application to implement this static server and supply the appropriate cdnUrl as a config option, thereby bypassing any need for a code change in apollo-server, other than maybe documentation/how to. According to this comment, though, this may already be fixed making this PR redundant: @abernix can you confirm? You referenced issue #1421 but didn't close #1421 so not sure |
Working example that doesn't need a modification to apollo-server-express here: https://github.com/penx/graphql-server-example Up to the maintainers where you want to take this. Let me know if you want me to do anything - would be great if you can get graphql/graphql-playground#845 in to your fork once merged, this should be all that's needed for now. |
Good news! That landed and should be included in Apollo Server once #1855 lands. Your workaround you provided in #1734 is great and along the lines of what I was looking at! I had been considering using |
I think this can be done using require.resolve app.use(
'/graphql-playground-react',
express.static(require.resolve('graphql-playground-react')),
); |
@abernix I just made a couple of updates - do you reckon this can be merged in? Or did you want to go a different route? |
I realize this is quite old at this point but, due to the extra weight of the For example, it's still possible to just set |
I would favour including the bundled assets by default and having a config value for serverless deployments. |
GraphQL Playground's maintainers have retired the project. It is not the default experience as of last year's Apollo Server 3 and won't be distributed as a maintained part of Apollo Server starting with Apollo Server 4 (imminent). So we are not going to improve it. Sorry for the delay! |
Partially fixes #1421