Support a different URL for playground
See original GitHub issue- feature
I know I can provide parameter path
when calling server.applyMiddleware({ app, path });
. But it looks like this path will be used for both the GraphQL API endpoint (when using XHR) and also for the playground (when visiting in a browser). Is it possible to use different URLs for them? e.g. /api/graphql
for the endpoint and /graphql-playground
for the playground
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:25 (7 by maintainers)
Top Results From Across the Web
GraphQL Playground - Apollo GraphQL Docs
In development, Apollo Server enables GraphQL Playground on the same URL as the GraphQL server itself (e.g. http://localhost:4000/graphql ) and automatically ...
Read more >Configuring Apollo Playground and API on two different URL
The website and the API are both using the same URL. It is problematic if you want the playground to use a particular...
Read more >How to change websocket url in graphql-playground ...
I wanted to change the graphql websocket end point inside graphql, anyone know how to do this? by default it pings wss://localhost/graphql. I ......
Read more >trailhead playground url issue - Salesforce Developers
1. Scroll to the bottom of this page. · 2. Click the arrow next to Launch and select Create a Trailhead Playground. Don't...
Read more >Complete guide to GraphQL Playground - LogRocket Blog
It's built on top of GraphiQL with additional features such as automatic schema reloading, support for GraphQL subscriptions, the ability to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found https://github.com/apollographql/apollo-server/blob/master/packages/apollo-server-express/src/ApolloServer.ts
It does not look like it’s supported.
If this sounds like a valid feature request, I can work on this and submit a merge request next week.
If I’m not mistaken, the
playground
key accepts anendpoint
parameter like so:So in your case, I believe you could do this (using express here as an example)
where you’d replace
your_domain_here
andyour_port_here
with your own variables, naturally. The shape ofendpoint
can be found here: https://github.com/prisma/graphql-playground#properties.