Skip to content
Discussion options

You must be logged in to vote

Okay, I've figured by myself.
This is the code that solved the problem:

const PRODUCT_IMAGE_FRAGMENT = `#graphql
  fragment ProductMediaImage on MediaImage {
    __typename
    mediaContentType
    image {
      __typename
      id
      url
      altText
      width
      height
    }
  }
` as const;

const PRODUCT_EXTERNAL_VIDEO_FRAGMENT = `#graphql
  fragment ProductExternalVideo on ExternalVideo {
    mediaContentType
    id
    embedUrl
    host
    originUrl
    presentation {
      id
    }
    previewImage {
      id
      url
      width
      height
      altText
    }
  }
` as const;

const PRODUCT_VIDEO_FRAGMENT = `#graphql
  fragment ProductVideo on Video {
    id
    mediaCo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by renatodex
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants