File uploads in apollo-server-hapi appear broken
See original GitHub issuePackage name
Here are the relevant package versions:
apollo-server-hapi@2.9.3
apollo-server-core@2.9.3
@hapi/hapi@18.3.2
I’ve tested this on Node.js 10.16.3
and npm@6.9.0
.
Expected behavior
I expect file uploads as described in the “File uploads” documentation to work with apollo-server-hapi.
Actual behavior
The server always sends 400
errors with a message of “GET query missing.”
Reproducible
I made https://github.com/swashcap/apollo-hapi-upload to show the problem. That project’s test is essentially copied from here: https://github.com/apollographql/apollo-server/blob/10402c46013920b5c9cd64d5ae1cc41f5fe5ceb5/packages/apollo-server-hapi/src/__tests__/ApolloServer.test.ts#L411-L496
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
File uploads - Apollo GraphQL Docs
Enabling file uploads in Apollo Server. ... For server integrations that support file uploads (e.g. Express, hapi, Koa), Apollo Server enables file uploads...
Read more >Apollo Server File Upload Best Practices - Apollo GraphQL Blog
One approach is to ensure that the GraphQL server itself can directly accept uploads, by adding a parser for multipart requests that contain ......
Read more >Migrating to Apollo Server 4 - Apollo GraphQL Docs
For a list of all breaking changes, see the changelog. This guide helps you migrate from Apollo Server 3 to Apollo Server 4....
Read more >Migrating to Apollo Server 3 - Apollo GraphQL Docs
File uploads. Apollo Server 2 provides built-in support for file uploads via an outdated version of the graphql-upload library. Using an updated version ......
Read more >File Uploads with Apollo Server 2.0 - Apollo GraphQL Blog
Update: May 2022For our recommendation on how to handle file uploads, read Apollo Server File Uploads Best Practices.
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
Any updates to this issue? I am hitting the same problem with our Hapi/Graph platform.
Also, the fact that none of the values are coming back ie: filename, encoding etc…
Has anyone found a workaround if this has not been fixed?
Integration with a fork of an old version of
graphql-upload
was removed from Apollo Server last year in AS3.Additionally, Apollo Server 4 replaces a hard-coded set of web framework integrations with a simple stable API for building integrations. As part of this, the core project no longer directly supports a Hapi integration. It should not be that hard for excited Hapi users to build and maintain a Hapi integration, and our guess is they will do a better job of it than the Apollo Server core team, who did not use Hapi at all other than to maintain the integration. There is not a Hapi integration at this time, but some interest has been expressed over at https://github.com/apollographql/apollo-server/issues/6028. Sorry for the delay!