Skip to content
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

Add query parameters to middleware pages #578

Closed
1 task done
lorensr opened this issue Feb 19, 2018 · 5 comments
Closed
1 task done

Add query parameters to middleware pages #578

lorensr opened this issue Feb 19, 2018 · 5 comments

Comments

@lorensr
Copy link

lorensr commented Feb 19, 2018

This issue pertains to the following package(s):

  • GraphQL Playground Express Middleware

It would be nice to be able to link to a Playground like this:

http://api.foo.com/playground?query={me{name}}

to set the query (like you can in GraphiQL) and maybe other fields, like endpoint and headers.

@huv1k
Copy link
Collaborator

huv1k commented Oct 28, 2018

Its possible to pass it like props of the playground or in the query string.

@huv1k huv1k closed this as completed Oct 28, 2018
@lorensr
Copy link
Author

lorensr commented Oct 29, 2018

@HuVik I don't see it in the docs—is above the correct query string format?

@jgillich
Copy link

@HuVik I looked through the source and I don't think there's any way to set the query via props. Are you sure about this? GraphQL If no, I'd suggest this to be reopened.

@huv1k
Copy link
Collaborator

huv1k commented Jan 29, 2019

@jgillich Its possible to do that, you can check how yoga is doing it dotansimha/graphql-yoga@c9f10c4#diff-f41e9d04a45c83f3b6f6e630f10117feR339

@jgillich
Copy link

jgillich commented Jan 29, 2019

Oh darn, it's part of tabs? Thank you, that works! And it even makes sense, lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants