-
Notifications
You must be signed in to change notification settings - Fork 97
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
How to configure for GHE? #54
Comments
@ScottChapman See https://github.com/OneGraph/graphiql-explorer-example. I agree, it would be nice to have a detailed description of each prop (something like https://github.com/OneGraph/graphiql-code-exporter#props) or at least a link to https://github.com/OneGraph/graphiql-explorer-example in the ReadMe. |
Oh, the ReadMe already have the link to https://github.com/OneGraph/graphiql-explorer-example, see https://github.com/OneGraph/graphiql-explorer#example-usage. |
Thanks, I actually did read through those. They seemed like mostly UI properties, not really related to setting a different graphql endpoint with auth headers. |
I think maybe I figured it out, I poked around in |
@ScottChapman Yes, https://github.com/OneGraph/graphiql-explorer-example/blob/master/src/App.js#L17 is the only line you should change. You can also add headers here: https://github.com/OneGraph/graphiql-explorer-example/blob/master/src/App.js#L20. Feel free to extract them to separate variables and use object spread to merge headers. 😉 |
coolio! So, if I wanted to deploy locally here, and make it so that other users would need to authenticate with our GHE (meaning I wouldn't hard code my bearer token), is there an easy way to do that? Or I suspect that might be beyond the scope of the example? |
Yes, providing UI for headers is out of scope of these projects. PTAL at https://graphiql-online.com. It's GraphiQL + Custom Headers plugin + GraphiQL Explorer + GraphQL Voyager. 😉 |
oh nice! (except Voyager comes up blank for me) |
Hm, that's strange! But GraphiQL and Explorer works? Could you please share the URL of your endpoint? I'll see what the problem is. |
https://github.ibm.com/api/graphql Logs:
|
Could you please provide auth header value for tests? |
nope, it's our company's enterprise github deployment... |
You can revoke this token later. Otherwise, ¯_(ツ)_/¯. |
yea, sorry... What's the above error look like? Is it running some query against the end point? Perhaps I can run it and send you the results? |
Try https://graphql-voyager.web.app ("Change schema" button -> "URL" tab). If it works in standalone GraphQL Voyager, this is a bug in GraphiQL Online. |
yes, that worked... |
I love this, and wanted to set this up using our own github enterprise deployment, but I couldn't figure out how to configure the endpoint. Is that documented somewhere?
The text was updated successfully, but these errors were encountered: