Skip to content

Instantly share code, notes, and snippets.

@sunapi386
Created May 4, 2019 02:17
Show Gist options
  • Save sunapi386/0af7d4eef07cf6e9020e601907e5507e to your computer and use it in GitHub Desktop.
Save sunapi386/0af7d4eef07cf6e9020e601907e5507e to your computer and use it in GitHub Desktop.
curl localhost:4000 \
-F operations='{ "query": "mutation ($file: Upload!) { singleUpload(file: $file) { id } }", "variables": { "file": null } }' \
-F map='{ "0": ["variables.file"] }' \
-F 0=@yarn.lock
curl localhost:4000 \
-F operations='{ "query": "mutation ($files: [Upload!]!) { multipleUpload(files: $files) { id } }", "variables": { "files": [null, null] } }' \
-F map='{ "0": ["variables.files.0"], "1": ["variables.files.1"] }' \
-F 0=@yarn.lock \
-F 1=@package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment