Skip to content

Instantly share code, notes, and snippets.

@airarm
Last active February 14, 2023 13:22
Show Gist options
  • Save airarm/311ecdc75899f8de4ba28682e3ffe0d5 to your computer and use it in GitHub Desktop.
Save airarm/311ecdc75899f8de4ba28682e3ffe0d5 to your computer and use it in GitHub Desktop.
Shopify file create with GraphQL
mutation fileCreate($files: [FileCreateInput!]!) {
fileCreate(files: $files) {
files {
alt
createdAt
fileErrors{
code
details
message
}
fileStatus
preview{
status
image{
altText
url
id
width
height
}
}
}
userErrors {
field
message
}
}
}
{
"files": [
{
"alt": "",
"contentType": "IMAGE",
"originalSource": "https://via.placeholder.com/600/FF0000/FFFFFF"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment