Hi community ![]()
Does anyone know, how I can get the url of a file I uploaded to shopify via GraphQL?
I have the gid and managed to get some info with this mutation:
files(first: 1, query: "id:'${id}'") {
edges {
node {
createdAt
updatedAt
alt
... on GenericFile {
id
url
}
}
}
}
}
The answer looks like this:
{
createdAt: '2025-03-02T10:27:45Z',
updatedAt: '2025-03-02T10:27:45Z',
alt: '',
id: 'gid://shopify/GenericFile/123456789',
url: null
}
Does anyone know a solution?
Important: I don’t upload images. I know that images get a value in the url field in the response. But other file types don’t.