Multipart GraphQL UploadHandler
#3666
tylermmorton
started this conversation in
Show and tell / tips
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all! Firstly, loving remix so far. I've been working on building out an app using Remix + GraphQL. This week I spent quite a while working on multipart uploads using GraphQL and I wanted to share my solution in case anyone is riding the same struggle bus or doing something similar. The
UploadHandler
I created implements jaydenseric/graphql-multipart-request-specHere's an image from the spec.

The GraphQL server is implemented using
99designs/gqlgen
-- it also supports the spec I mentioned above with just a couple of additional transport settings. (docs)And here's my Remix
UploadHandler
-- It's rough and could be cleaned up so don't judge 😅 ... I based it off the pre-existingMemoryUploadHandler
and extended it to pass the file data in the correct format.and here's the handler in action:
Thanks for checking it out! Hope someone finds this useful! 👍
Beta Was this translation helpful? Give feedback.
All reactions