Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hi,
I want to use the fileUpload mutation which requires an ID as input parameter, but I cannot find the file id in e.g. the "files" connection on the query root.
Thanks,
-Louise
Even I tried to get the ID but can not get. Did you find a solution to it?
No I suspect that either the files services are designede to work in an entirely different way - e.g. files should be staged first (currently I see this ad an option if you are not able to upload files on a server yourself) , OR that the services has some bugs as they are relatively new.
Hi @Lull ,
you get the file ID for the mutations fileUpdate and fileDelete by refering to the GenericFile. The query then looks as follows:
{
files(first:10) {
edges {
node {
... on GenericFile {
url
id
alt
}
}
}
}
}
Regards
Thomas
Thank you!! This was so helpful.
My mutation is returning the id, but the url is blank.
Can I use the id to query the files? if so, do you have an example (the docs are sparse and the App says I don't have read_files/write_files permissions - also can I get these permissions on the app)
Any help is greatly appreciated 🙂
User | RANK |
---|---|
6 | |
5 | |
5 | |
4 | |
4 |