-
-
Notifications
You must be signed in to change notification settings - Fork 31
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 set cookie/headers when running query/mutation? #71
Comments
@vinaybedre, one way to achieve that with this package as of now would be to add an interceptor on the In the interceptor, you could check the URL and method and add the header. I haven't tried that though. It might be nice if we exposed an ability to pass service overrides per hook but that will involve code changes. |
I have opened an issue in @hey-api/openapi-ts#465 to add the functionality to override the OpenAPI config per request. |
I was able to set headers by specifying them in the swagger definitions:
|
This is the correct way to document the need for the headers! Thanks for sharing :) |
I really like codegens, which make the life of developers easy.
How ever with this codegen, I was unable to find a way to set cookie/header per query/mutation level. I couldnt find anything in documentation either.
Did someone achieved this?
The text was updated successfully, but these errors were encountered: