GraphQL File Update / Express not working without graphql-upload package
See original GitHub issueHi, based on the documentation I thought we will not need any additional package for the File Upload.
We have an Express Server.
const yogaServer = createYogaServer({
schema,
plugins,
});
// serve graphQL
app.use(
Config.GRAPHQL_ENDPOINT,
(req, res, next) => {
(req as any).identifier = v4();
next();
},
// graphqlUploadExpress(),
yogaServer,
);
Without the use of the graphqlUploadExpress
middleware we are getting the following error:
400 Bad Request
{
"data": null,
"errors": [
{
"message": "Must provide query string."
}
]
}
Documentation: https://www.graphql-yoga.com/docs/features/file-uploads
Issue Analytics
- State:
- Created a year ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
File uploads not working with graphql-upload package #901
Current behavior. I was going through tutorials on how to use NestJS with graphql. I wanted to create a mutation to upload a...
Read more >Apollo-Server-Express not receiving Upload Object
I've tried in the resolver to await the file and then display it, but it still displays as being empty. I've added code...
Read more >File Uploads on GraphQL: Why or Why not
For our File Upload to work, we need to initialize the graphql-upload package in our main.ts. import { NestFactory } from '@nestjs/core'; ...
Read more >File Uploads with GraphQL, Google Cloud Storage and Node.js
Uploading files to Google Cloud Storage with an Express GraphQL server ... This middleware is available in the graphql-upload package:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the reproduction @JoJ123 ! I think this issue seems to be gone as well with the versions here. https://github.com/dotansimha/graphql-yoga/pull/1337#issuecomment-1172455572 Could you confirm? https://codesandbox.io/s/compassionate-newton-3hsvu6?file=/server.ts
Thanks @JoJ123 for your help! New version with fixes is out! https://github.com/dotansimha/graphql-yoga/pull/1343