apollo-federation-file-upload icon indicating copy to clipboard operation
apollo-federation-file-upload copied to clipboard

File Upload cant upload

Open jaymarkjairi opened this issue 3 years ago • 9 comments

I already follow the documentation about this but an error will show this is the error image

please see my source code thank you https://github.com/jaymarkjairi/file-upload

jaymarkjairi avatar Sep 10 '21 07:09 jaymarkjairi

facing same issue, any update on this?

kalyanmantri avatar Oct 28 '21 13:10 kalyanmantri

same with version 3.0.0; any updates?

BenjamenMeyer avatar Mar 17 '22 18:03 BenjamenMeyer

Hello guys. Maybe you both are missing some required setps. Our tests are using apollo v3 and are running fine.

cabelitos avatar Mar 17 '22 21:03 cabelitos

in the example above https://github.com/jaymarkjairi/file-upload, @jaymarkjairi forgot to define the FileUpload resolver. see https://github.com/profusion/apollo-federation-file-upload/blob/master/test/gen-service.ts#L128 Also check: https://www.apollographql.com/docs/apollo-server/data/file-uploads/

cabelitos avatar Mar 17 '22 21:03 cabelitos

We had not yet migrated ApolloServer from apollo-server to apollo-server-express; trying that. Anything else we should look for?

BenjamenMeyer avatar Mar 17 '22 21:03 BenjamenMeyer

@BenjamenMeyer so this is the case apollo-server does not bundle the file upload support out of the box. Check the link that I sent (https://www.apollographql.com/docs/apollo-server/data/file-uploads/ )

Quoting the 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 as apollo-server-express instead. This page shows how to integrate graphql-upload with Express and Fastify. To implement similar functionality with another Node.js HTTP framework (e.g., Koa), see the graphql-upload documentation for more information. Some integrations might need to use graphql-upload's processRequest directly.

cabelitos avatar Mar 19 '22 17:03 cabelitos

Thanks... we're trying to figure out the port to apollo-server-express

BenjamenMeyer avatar Mar 19 '22 20:03 BenjamenMeyer

@BenjamenMeyer Any updates on this? else we can close this issue.

oliveirarleo avatar Jan 23 '23 13:01 oliveirarleo

@oliveirarleo my (now former) employer ended up abandoning the effort and directing all file-uploads through a RESTful API call outside of the Apollo Server Gateway functionality (which we were using to federate a GraphQL API) as we were having too much difficulty getting it to work.

So while we couldn't get it to work, I wouldn't say this issue is closed unless someone else has fixed something, but I'm no longer in a position to contribute to this at all or even validate a fix. Please handle as you feel is appropriate.

BenjamenMeyer avatar Jan 23 '23 16:01 BenjamenMeyer