Replies: 1 comment
-
We're having the same issue. We've gotten around it by having our app route handler fetch all the tokens you'll personally need for this request and stash them in context. Then in the yml
|
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
-
Hello,
I have a graphql endpoint that requires authentication with Bearer token.
.meshrc.yml
is similar to this example:If I hardcode the token, the application works perfectly, but I need dynamic values there and I don't want to get that from the header everytime. The plan is that, before every query I try to call the endpoint with the actual token and if it fails, I call a
/token
endpoint to retrieve a new token.So, is it possible to implement a custom logic that handles/refreshes the Bearer tokens?
In a different discussion I found this comment:
"This feature will be available in the next version soon so you will be able to provide custom headers by exporting an object from a js file"
schemaHeaders: ./introspection-headers.js
But for me this doesn't work.
Is there any way to handle this properly?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions