Apollo-server: File uploads in apollo-server-hapi appear broken

Created on 9 Sep 2019  路  4Comments  路  Source: apollographql/apollo-server

Package name

Here are the relevant package versions:

I've tested this on Node.js 10.16.3 and [email protected].

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

馃К uploads

Most helpful comment

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?

All 4 comments

Note that the file upload test for apollo-server-hapi is ignored! Might be good to un-ignore the test.

I'll take a look at fixing this in a pull request. I think the problem comes from handleFileUploads:

https://github.com/apollographql/apollo-server/blob/10402c46013920b5c9cd64d5ae1cc41f5fe5ceb5/packages/apollo-server-hapi/src/ApolloServer.ts#L18-L34

Something to do with that not working.

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?

i am having doubts that this ever worked... it is even on hapi 17 not working

Was this page helpful?
0 / 5 - 0 ratings