graphql-playground icon indicating copy to clipboard operation
graphql-playground copied to clipboard

Feature Request: FilePicker on Upload scalar

Open akoenig opened this issue 6 years ago • 20 comments

This issue pertains to the following package(s):

  • [X] GraphQL Playground - Electron App
  • [X] GraphQL Playground HTML
  • [X] GraphQL Playground

Feature Request

Now, where apollo-upload-server seems to be established as the de-facto standard when it comes to handling file uploads, it would be awesome to bring up a file picker dialog on Upload scalars. Something like:

playground-filepicker

With something like that in place, it wouldn't be necessary to build a client application for testing file uploads anymore.

akoenig avatar Mar 11 '18 17:03 akoenig

Any updates on this? This would be a great addition to the playground.

ghost avatar Sep 11 '18 06:09 ghost

Would love to see this feature implemented!

nick-keller avatar Sep 17 '18 13:09 nick-keller

Would really love to see this!

In the mean time, for those not aware, you can test mutations or queries with Upload scalars without a full blown application using https://insomnia.rest. You have manually construct a GraphQL multipart request for your mutation though, which is pretty fiddly:

screen shot 2018-11-19 at 12 29 02 pm screen shot 2018-11-19 at 12 32 34 pm

Another way is to use cURL.

jaydenseric avatar Nov 19 '18 01:11 jaydenseric

While it is a nice UX to have the file picker appear for Upload scalar arguments, perhaps it's desirable to allow any argument to be a window.File (or window.FileList?) instance for purposes of testing bad input.

jaydenseric avatar Nov 19 '18 01:11 jaydenseric

Maybe there could be a panel tab next to "Query variables" and "HTTP headers" called "Uploads" with an appendable list of file inputs. Each file input has a drag and drop placeholder representing the value that can be placed in one or multiple locations in the query/mutation.

jaydenseric avatar Nov 19 '18 01:11 jaydenseric

@jaydenseric So if we provide some design would you be up for implementation? :)

huv1k avatar Nov 22 '18 15:11 huv1k

love and need this feature

taozhi8833998 avatar Jan 10 '19 15:01 taozhi8833998

bump

tomasikp avatar Mar 14 '19 07:03 tomasikp

Heads-up that Altair has supported file uploads for a while now, so if you are desperate for a nice GUI give it a go. It might be a source of inspiration for the implementation here…

Screen Shot 2019-05-15 at 7 43 02 pm

jaydenseric avatar May 15 '19 09:05 jaydenseric

@jaydenseric, thanks for mentioning Altair. It works quite nice with the option to "add query" and "add fragments" directly from the docs.

I'm only missing the Tracing view from graphql-playground.

smeijer avatar Aug 02 '19 13:08 smeijer

still alive?

orlowang avatar Jan 12 '20 17:01 orlowang

being revived soon! details to come later this month

acao avatar Jan 12 '20 17:01 acao

There is any update for [email protected] ??

enzoftware avatar Jan 28 '20 22:01 enzoftware

Any updates?

ojaswa1942 avatar May 21 '20 22:05 ojaswa1942

any update about this?

kbhyan avatar Jun 18 '20 17:06 kbhyan

It's painful 😩 to debug the File upload.

Follow 4 steps to test out Single/Multiple File Upload in GraphQL

1️⃣ Construct the mutation 2️⃣ Drop the file 3️⃣ Assign the file-variable value 4️⃣ Hit the play button

https://twitter.com/shreya_gr/status/1278669430579515403

image

Nishchit14 avatar Jul 02 '20 13:07 Nishchit14

Any updates?

grahamb avatar Nov 10 '20 00:11 grahamb

Any Progress on this??

JayMGurav avatar Aug 19 '21 03:08 JayMGurav

2018 and we are in 2022, this feature is important for test applications, why take a long time ?

TheElegantCoding avatar Sep 15 '22 18:09 TheElegantCoding

We'd love to see this added to the playground as well.

burkematthew avatar Nov 10 '22 22:11 burkematthew