-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add support for GraphQL multipart request #12
Comments
Hi @srekapalli, multipart requests are indeed not (yet) supported. I will look into this and consider supporting the multipart spec. Do you know if other graphql implementations implement this https://github.com/jaydenseric/graphql-multipart-request-spec spec? |
@marceloverdijk - It looks like GraphQL-Java-Kickstart added support for that spec: |
Correct graphql-java-kickstart/graphql-java-servlet does indeed support it. I was wondering if other implementations like graphqljs or the express module also support it or not, to see if that spec is widely adopted. |
After initial investigation Micronaut currently does not support retrieving the parts of multipart request. At least not in the sense needed to implement the https://github.com/jaydenseric/graphql-multipart-request-spec. Micronaut does support retrieving parts, but only if the part names are known upfront, which we don't know for https://github.com/jaydenseric/graphql-multipart-request-spec. micronaut-projects/micronaut-core#1957 is created to provide a way to retrieve the parts. Until then https://github.com/jaydenseric/graphql-multipart-request-spec cannot be implemented unfortunately. |
Support for retrieving multiparts is scheduled for Micronaut Core |
Support for retrieving multiparts is now added to Micronaut Core and will be part of Micronaut However, there is another Micronaut Core issue pending to implement this feature in Micronaut GraphqL: micronaut-projects/micronaut-core#1971 as we currently cannot distinguish the routes. |
Note micronaut-projects/micronaut-core#1971 has been released as part of Micronaut Core |
Putting this on hold to consider whether to add non-official GraphQL spec related functionality or not. |
Hi there! RuntimeWiring runtimeWiring = RuntimeWiring.newRuntimeWiring()
.scalar(CompletedFileUploadScalar.UPLOAD_SCALAR)
...
.build(); and then get CompletedFileUpload file = environment.getArgument("file"); |
Trying to make GraphQL multipart request work as per this specification https://github.com/jaydenseric/graphql-multipart-request-spec , but receiving error when I send a multipart request. Is Multipart request supported now in Micronaut/GraphQL extension ?
Error:
/string - Failed to convert argument [string] for value [null] due to: Cannot deserialize instance of
java.lang.String
out of START_OBJECT tokenat [Source: UNKNOWN; line: -1, column: -1]] using codec: io.micronaut.jackson.codec.JsonMediaTypeCodec@439d545c
---- Logs ----
The text was updated successfully, but these errors were encountered: