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

Can we have a template for this amazing tool? #70

Open
dliusc opened this issue May 16, 2021 · 4 comments
Open

Can we have a template for this amazing tool? #70

dliusc opened this issue May 16, 2021 · 4 comments

Comments

@dliusc
Copy link

dliusc commented May 16, 2021

First of all, thanks for making this amazing tool.
I wonder if we could have some way that can be easily used to integrate this into an endpoint.
E.g.

https://github.com/graphql-go/handler/blob/master/graphiql.go#L72

https://github.sc-corp.net/Snapchat/miniprogram/blob/d164b721bff78e461912c0a66d6ac3183ed724eb/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go#L8-L8

@sgrove
Copy link
Contributor

sgrove commented May 17, 2021

Sure, that's a fair request! We actually have https://github.com/OneGraph/graphiql-with-extensions so that you can just include one <script ... tag to e.g. unpkg and get GraphiQL with the explorer plugin, if that's a bit easier.

@sgrove
Copy link
Contributor

sgrove commented May 17, 2021

Also, if you'd like help integrating the explorer more naturally, also up to pair - it usually takes < 20 minutes, depending on how deeply nested the graphiql dependency is.

@dliusc
Copy link
Author

dliusc commented May 17, 2021

Thanks! I tried https://github.com/OneGraph/graphiql-with-extensions/blob/master/examples/static.html
it works well.
One more thing, is there any config option that allow me to edit the header from the UI?
Like this below
image

@rhengles
Copy link

rhengles commented May 24, 2021

Sure, that's a fair request! We actually have https://github.com/OneGraph/graphiql-with-extensions so that you can just include one <script ... tag to e.g. unpkg and get GraphiQL with the explorer plugin, if that's a bit easier.

@sgrove That's a great find! I suffered a week with webpack trying to reacreate this, a static script that I could just call and use it directly.

However I do have one problem - with my integration, it is generating a call for IntrospectionQuery that fills the GraphiQL Explorer. With the static script above the explorer panel is just empty. How can I have it load the schema from the fetcher?

Edit: Nvm, I got it working, my fetchURL was broken and I didn't see the error in the console...

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