Insomnia: Add better support for fileuploads to graphQL

Created on 1 Feb 2019  路  13Comments  路  Source: Kong/insomnia

  • Insomnia Version: 6.3.2
  • Operating System: macOS Mojave 10.14.2

Feature Request

Currently it's possible to upload files to GraphQL using Insomnia by sending a POST Multipart request, following the graphql-multipart-request-spec.

But it would be awesome if you could do this using a file picker in Insomnia.

I followed the GraphQL file upload implementation described here.

accepted

Most helpful comment

Still relevant.

All 13 comments

馃憢 Thanks for opening your first issue! If you're reporting a 馃悶 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 馃巵, please provide real
use cases that would benefit. 馃應

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

Now there is event a place to look for inspiration 馃槃 https://sirmuel.design/working-with-file-uploads-using-altair-graphql-d2f86dc8261f

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Still relevant.

Bad bot. Please re-open.

@gschier Could you please reopen this? It doesn't get the attention it deserves.

I'm looking at the spec and I don't really feel multipart/form-data being appropriate for GraphQL, as it is not data from a "form". The multipart/related content-type (RFC2387) would be a better fit since the files will be parts "related" to the main part, i.e. the query.

I believe usage of multipart/form-data is already part of the graphql spec: https://github.com/jaydenseric/graphql-multipart-request-spec
At the very least, Apollo Server already makes use of this spec for handling graphql file uploads: https://blog.apollographql.com/file-uploads-with-apollo-server-2-0-5db2f3f60675

@dauledk @gschier is there a way this issue can be re-opened? I'd also need this feature to easily test file uploads on a GraphQL endpoint... Thanks!

We could add this to the next 6 months iteration plan? I could work on it

Is there a way I can contribute to the implementation of this feature?

Would love to see this. Using curl in the meantime

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tmaiaroto picture tmaiaroto  路  4Comments

Natfan picture Natfan  路  3Comments

shadeglare picture shadeglare  路  3Comments

claratorres picture claratorres  路  3Comments

oliverjanik picture oliverjanik  路  3Comments