Replies: 1 comment
-
You can do that with the programatic usage, or use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First of all, I want to thank you for your amazing work! This library is awesome 😄
I'm using graphql-code-generator to generate typing from multiple graphql servers that implement the OpenID protocol (Microservice architecture). To do so, I need to fetch an access_token from an authorization server before I use the /grapql endpoints.
How would you automatically fetch the token and pass it in the Authorization header in the codegen.yaml file ?
I tried to fetch the $TOKEN in the afterStart lifecycle hooks with a scripts and then use it in the Authorization header, but it is not possible since the script exporting the environment variable needs to be sourced beforehand.
Before I move on to other tools/liraries to pre-fetch the token, I want to know if this is actually possible to achieve what I ask with only this library.
Thank you :)
Beta Was this translation helpful? Give feedback.
All reactions