Hello,
I want to upload file in graphql API where upload file using mutation same as File uploads - Apollo GraphQL Docs given example.
In that it’s possible for upload file without express?
Hello,
I want to upload file in graphql API where upload file using mutation same as File uploads - Apollo GraphQL Docs given example.
In that it’s possible for upload file without express?
Yes it is possible - see this note from the https://www.apollographql.com/docs/apollo-server/data/file-uploads/ docs:
New in Apollo Server 3: Apollo Server 3 does not contain a built-in integration with
graphql-upload
like in Apollo Server 2. Instead, the instructions below show how to integrate it yourself. You cannot do this with the “batteries-included”apollo-server
library; you must use a web framework integration such asapollo-server-express
instead. To implement similar functionality with another Node.js HTTP framework (e.g., Koa), see thegraphql-upload
documentation for more information. Some integrations might need to usegraphql-upload
'sprocessRequest
directly.
Referring to the graphql-upload
documentation should help.