-
Notifications
You must be signed in to change notification settings - Fork 153
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
Issue explicitly forwarding Content-Type header with introspected federation API #147
Comments
Just to clarify, when you use |
@jensneuse That is correct. The builder works with the removal of the call to the builder to forward the header |
I understand. Stupid question, why do you want to forward the Content-Type from the client? The gateway will send the federated Operations, so it will "own" the requests. All requests should be Content-Type application/json. What's a reason you'd like to override this? |
@jensneuse Just something I tried to start. It produced an error and I couldn't run the Wundernode, so I removed it and things worked. When I dug into the issue, I noticed the described behavior, so I thought it'd be helpful to report. We had also played around with the idea of changing the content-type to No worries if this is something y'all want to reject, just wanted to pass it along. |
Yeah, I appreciate you've opened the issue. I'm not against allowing to pass Content-Type, it's just weird that it has these side effects. We'll definitely look into it. |
@spetrunin I think this is important input for your current task. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug description
When using the following code block to build header forwarding for a federated introspection, I'm seeing headers replaced with templates rather than values:
My subgraph is receiving the following HTTP request headers (shown as JSON):
By removing the
.addClientRequestHeader('Content-Type', 'Content-Type')
line, I start to get header values forwarded correctly. This is an acceptable work around, I just wanted to pass along what I encountered.How to reproduce
wunderctl up
Expected behavior
Receive the specified forwarded header values provided in the HTTP request to the Wundernode in the subgraph.
WunderGraph information
wundergraph.server.ts
wundergraph.operations.ts
wundegraph.config.ts:
Environment & setup
WunderCtl Version
The text was updated successfully, but these errors were encountered: