Skip to content

Instantly share code, notes, and snippets.

@plinionaves
Created March 6, 2020 02:32
Show Gist options
  • Save plinionaves/aa9246e28865d34349b4effe6045edc0 to your computer and use it in GitHub Desktop.
Save plinionaves/aa9246e28865d34349b4effe6045edc0 to your computer and use it in GitHub Desktop.

GraphQL Upload

operations

{
  "query": "mutation SingleUpload($data: UploadInput!) { singleUpload(data: $data) { _id filename url mimetype } }",
  "variables":{
    "data": { 
      "file": null
    } 
  }
}

map

{ 
  "photo": ["variables.data.file"]
}

photo O arquivo (file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment