New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multipart request specification #358
Comments
I personally would argue against using multipart GraphQL uploads. Instead, I'd upload a file to S3 and then work with the URL of the file, which is just a string. That said, if you're interested in using graphql-go-tools with multiplart file uploads, nothing holds you off from writing an http handler that parses a multipart request and then handles an upload as well as the graphql request. |
Thank you for your response. Anyway, uploading file via graphql is a valid option with pros & cons. You are right, there is no issue writing a handler that works with multipart data. |
@cauchy2384 Take this "gateway" as a starting point. It currently doesn't handle multipart, but can easily be added: https://github.com/jensneuse/graphql-go-tools/blob/bbc67ff664c8bfa283f8cab0f7f40cec1fd65831/examples/federation/gateway/http/http.go#L18 |
@jensneuse thank you, that is the example I've been working with. Unfortunately I can't find any methods for graphql.Request or engine that will add multipart file data and pass it to the federated service. |
@cauchy2384 the meaning is that you should write your own Request, engine and etc. |
@jensneuse maybe you have already the solution of a file uploading? |
My personal opinion is to upload files to S3 and manage data through GraphQL, not blobs. You're free to build anything "around" graphql-go-tools obviously. I'm currently not interested in adding file upload capabilities. I've summarized my thoughts in this blog post a while ago: https://wundergraph.com/blog/graphql_file_uploads_evaluating_the_5_most_common_approaches |
Hello, I am trying to build apollo federation in my project using graphql-go-tools as the best go implementation of federation.
Grapql multipart request spec is essential to perform file uploads.
It is implemented by the gqlgen.
Could you please tell me if there is an example of multipart request implementation or plans to support it?
The text was updated successfully, but these errors were encountered: