graphql

defa 2020-06-09T05:36:10.171100Z

Is there a way with lacinia-pedestal to handle multipart/form-data uploads? Iā€™d like to do a file upload together with a GraphQL mutation. Although not the best solution to the problem (scaling, load, ā€¦) it would be fine in my case. As an alternative I could go with a signed upload URL approach which might be a little more complicated. Has anyone done something similar with lacinia-pedestal and is willing to share her experience? Thanks in advace!

2020-06-09T13:31:52.171400Z

In the past I have seen a mutation to get an upload token, and then the file is uploaded to a rest endpoint using the token

2020-06-09T18:37:50.171600Z

We have an internal lib that implements the graphql upload spec

2020-06-09T18:38:26.171800Z

This spec: https://github.com/jaydenseric/graphql-upload

2020-06-09T18:38:36.172100Z

Works pretty nicely!

domkm 2020-06-10T15:07:32.172300Z

@lennart.buit Any chance you might open source that internal lib?

2020-06-10T15:08:39.172500Z

Yeah, thats the plan ^^! It may take a bit tho, because its not the topmost priority

domkm 2020-06-22T16:46:43.201700Z

How about just a non-functional gist to start with? šŸ˜‰