You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If possible, please create a PR with a failing test to illustrate the issue clearly.
Otherwise, please attach a minimum reproduction through a GitHub repository that includes
essential information such as the relevant subgraph SDLs.
Please also make sure that the instructions for the reproduction are clear, tested, and fully accurate.
Description
When attempting to upload a file through the Router, the name of the field in the schema must be file, as illustrated in the example provided: https://cosmo-docs.wundergraph.com/router/file-upload
Any other name will result in the router passing null as the file data to the final federated GraphQL server.
This is because the httpclient package, which is part of the graphql-go-tools repository, has a hardcoded name for the file variables, which is file, as evident in the nethttpclient.go file.
Create a simple WunderGraph router that is federating a GraphQL server with a schema that has a query with a file upload query. Make sure the field of the file data is not named file
Try to upload a file to print the contents of the file at the GraphQL server as it was passed by WunderGraph router.
Expected Result
If this is by design it should be stated explicitly in the docs that you can upload files only using fields that are named file.
Other wise the expected result is that the file upload should work with any field name.
Actual Result
The destination GraphQL server receives a null file
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.
Component(s)
router
Component version
0.158.0
wgc version
0.71.3
controlplane version
None
router version
0.158.0
What happened?
If possible, please create a PR with a failing test to illustrate the issue clearly.
Otherwise, please attach a minimum reproduction through a GitHub repository that includes
essential information such as the relevant subgraph SDLs.
Please also make sure that the instructions for the reproduction are clear, tested, and fully accurate.
Description
When attempting to upload a file through the Router, the name of the field in the schema must be
file
, as illustrated in the example provided:https://cosmo-docs.wundergraph.com/router/file-upload
Any other name will result in the router passing
null
as the file data to the final federated GraphQL server.This is because the
httpclient
package, which is part of thegraphql-go-tools
repository, has a hardcoded name for the file variables, which isfile
, as evident in thenethttpclient.go
file.Steps to Reproduce
file
Expected Result
If this is by design it should be stated explicitly in the docs that you can upload files only using fields that are named
file
.Other wise the expected result is that the file upload should work with any field name.
Actual Result
The destination GraphQL server receives a null file
Environment information
Environment
OS: MacOS 15.2
Package Manager: npm
Compiler(if manually compiled): (e.g., "go 14.2")
Router configuration
No response
Router execution config
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: