Skip to content

Support dynamic endpoint options #72

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

Closed
piotrd opened this issue Apr 2, 2017 · 4 comments
Closed

Support dynamic endpoint options #72

piotrd opened this issue Apr 2, 2017 · 4 comments
Labels

Comments

@piotrd
Copy link

piotrd commented Apr 2, 2017

I am working with a GraphQL API that requires authorization with a token (authorization header option passed with each request). With each session the token changes, and I have to manually update it in graphql.config.json. I have not yet found a way to pass e.g. process.env.ACCESS_TOKEN, but maybe there is some way to achieve that? If not, then it would be great to have node env variables to override at least headers in graphql.config.json, although it may not be possible, because the app and the plugin work in separate node environments...

@piotrd
Copy link
Author

piotrd commented Apr 2, 2017

So far the only thing that works for me is a node script updating the auth header in graphql.config.json on app start.

@skyjia
Copy link

skyjia commented Jun 2, 2017

+1

@dudunato
Copy link

dudunato commented Apr 7, 2018

+1

@jimkyndemeyer
Copy link
Collaborator

See remote-schema-introspection for how v2 of the plugin supports this use case. You can specific API tokens via environment variables in the .graphqlconfig file as described in the graphql-config documentation.

If you'd like to help test v2 the releases are found at https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/releases

Best regards,
Jim.

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

No branches or pull requests

4 participants