I'm writing graphql query to fetch a Shopify product, and I cannot figure out how to get the product's media sources. The only available fields in the MediaConnection! according to the docs and GraphiQl are alt, mediaContentType, and previewImage.
Simplified query below:
{
productByHandle(handle: ${handle}) {
media(first: 5) {
edges {
cursor
node {
alt
mediaContentType
previewImage {
altText
originalSrc
transformedSrc(maxWidth: 500, maxHeight: 400, crop: CENTER, preferredContentType: JPG)
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
}
This is fine if I don't have any video in the media, the previewImage will suffice, but, what if the mediaContentType is video? How do I get the sources of the Video?