When querying the Shopify GraphQL Admin API at /admin/api/2024-10/graphql.json
, we are seeing unexpected null
values in the preview.image
field within the media
array.
query {
products(query: "...", first: 100, after: "...") {
nodes {
id
media(first: 120) {
nodes {
preview {
image { id url }
}
{
"data": {
"products": {
"nodes": [
{
"media":
"nodes":
{
"preview": {
"image": null
}
},
{
"preview": {
"image": null
}
},
{
"preview": {
"image": {
"id": "gid://shopify/ImageSource/...",
"url": "https://cdn.shopify.com/s/files/1/....jpg"
}
}
},
{
"preview": {
"image": null
}
}
We are receiving multiple null
values for data.products.nodes.media.nodes.preview.image
. Could you clarify:
- Is it expected behavior for some media items to have
null
images inside array? - If so, under what conditions does this occur?
- If not, what could be causing this issue, and how can we ensure all media items have valid images?
Thank you for your help!
Best, Ilya