Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hey,
I always get this error when I try to request a image, even though it is defined:
https://shopify.dev/api/admin-graphql/2022-04/objects/Image#field-image-url
"Field 'url' doesn't exist on type 'Image'"
Seems to be a bug to me, the image resource should always have a url.
{
files(first: 5) {
edges {
cursor
node {
createdAt
alt
__typename
... on MediaImage {
id
alt
image {
id
width
url
height
__typename
}
__typename
}
fileErrors {
code
details
message
__typename
}
}
__typename
}
pageInfo {
hasNextPage
hasPreviousPage
__typename
}
__typename
}
}
This query will fail with the mentioned error. When I remove the url it works flawlessly.
This is basically the same query that is done in the admin interface when you open the files list. Funnily, there url works without issues.
Does someone know how to solve this and get the url for the images?
I'm facing the same issue with shopify-api-node package, but the query works on Postman
I was using the wrong API version, the url property was added to the Image object on version 2022/01
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024