To create my Shopify App, I need the same table as you can find on the Content → Files page:
As I researched, this page using
https://admin.shopify.com/api/shopify/?operation=FilesManagerFiles&type=query
With provided files query
But as i can see, connectedResourceInfos , that provides info about an object image connected with (it is very required for me), doesn’t exists on the files query
How can I get access to that query, or is there is a way to take the same result with other query?
You are partially right, but the documentation does not contain the connectedResourceInfos field. I really need it to know which object the file belongs to.
Otherwise, is there any way to find out without going through all the products, collections and articles in the store, matching the file?
Hi, @atyaglik
Sorry for the confusion. After reviewing the Shopify GraphQL schema, it appears that there is no direct field available within File type to determine the specific product or collection it is connected to.
interface File {
alt: String
createdAt: DateTime!
fileErrors: [FileError!]!
fileStatus: FileStatus!
id: ID!
preview: MediaPreviewImage
updatedAt: DateTime!
}
But i noticed you could use a metafield to the product or collection object to store the file ID or a reference to the file.
what do you think?
Hi @atyaglik ,
Thanks for your post. There isn’t currently a way to get the connected resource info for the Files resource in the public GraphQL Admin API so we’ve passed along some feedback about it on your behalf.
Hope you have a great day