Skip to content

Instantly share code, notes, and snippets.

@bdunogier
Created March 16, 2019 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bdunogier/5a5c51b00c33abbf251079015b744831 to your computer and use it in GitHub Desktop.
Save bdunogier/5a5c51b00c33abbf251079015b744831 to your computer and use it in GitHub Desktop.
curl -v -X POST \
   https://localhost:8000/graphql \
   -H 'Cookie: eZSESSID21232f297a57a5a743894a0e4a801fc3=3p30i5bu4h8seeu6avubimdj4c; eZSESSID98defd6ee70dfb1dea416cecdf391f58=igsqlrp39miio4h4a1ddc7b1et' \
   -F 'operations={"query":"mutation CreateImage($name: String!, $alternativeText: String!, $file: FileUpload!) { createImage( parentLocationId: 51, input: { name: $name, image: {name: \"Son-Gohan\", alternativeText: $alternativeText, file: $file} } ) { _info { id mainLocationId } name image { fileName alternativeText uri } } }","variables":{"file": null, "name": "Gohan", "alternativeText": "Final cell battle"}}' \
   -F 'map={"0":["variables.file"]}' \
   -F "0"=@/Users/bdunogier/Documents/Capture\ d’écran\ 2019-03-07\ à\ 00.50.42.png
curl -v -X POST \
  https://localhost:8000/graphql \
  -H 'Cookie: eZSESSID21232f297a57a5a743894a0e4a801fc3=3p30i5bu4h8seeu6avubimdj4c; eZSESSID98defd6ee70dfb1dea416cecdf391f58=igsqlrp39miio4h4a1ddc7b1et' \
  -F 'operations={"query":"mutation test($file: FileUpload!) { createAllmighty(parentLocationId: 256, input: { textLine: \"Allmighty #10 (file)\", binaryfile: { file: $file } }) { _name _url _info {mainLocationId} binaryfile { fileName uri } } }","variables": {"file": null}}' \
  -F 'map={"0":["variables.file"]}' \
  -F "0"=@/users/bdunogier/Downloads/green-book-sur-les-routes-du-sud.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment