-
Notifications
You must be signed in to change notification settings - Fork 360
Receive files sent via apollo client on a spring-boot back-end #661
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
Comments
Apollo file uploads are not part of the GraphQL specification are not supported "out-of-the-box". As per #518 you will have to configure Jackson object mapper to correctly handle those types (and potentially also configure custom data fetcher to apply the custom logic - if needed). |
Hi @gonzalt03 , We have trying to do the same thing, you can check this gist to see how we have implement the behavior. |
This week, we'll be take the time to create the PR on that issue soon. |
At this time we don't have intention to add support for this feature "out-of-the-box" as it is not directly related to running a generic GraphQL server and is more of a specific feature of your server implementation. As mentioned above, it is possible but requires additional configuration. I am going to close this issue, but feel free to continue to document your learnings for others here. |
I wanted to comment on how I was able to implement file uploading. Note: I am using S3 for asset hosting
This works well for me, since the GraphQL server is an API gateway and file processing is done by another service. This allows me to deliver reference the uploaded file when communicating between services, rather than passing a large binary blob that might not even be processed. |
The configuration of the spring-boot with graphql will it manage basic multipart requests made by Apollo client ?
Do you have an example of a complete and functional file sending implementation on a spring-boot graphql back-end?
As it stands, a 400 BAD REQUEST is returned by the spring-boot. I do not understand why. The request is however well recognized by the ContextWebFilter in the graphql-kotlin-spring-server library.
The text was updated successfully, but these errors were encountered: