i have an issue with api front end

Highlighted
New Member
5 0 0

I'm using the front api with my angular website, i was following this link below:

https://shopify.dev/graphiql/storefront-graphiql

GraphURl:  https://mystore.myshopify.com/api/graphql

 

but when i used 'compareAtPriceRange' with my code i got this error 'Field 'compareAtPriceRange' doesn't exist on type 'Product' . Also same problem with 'compareAtPriceRange'

but this field is exist in the query . Any idea? how can check the api version on my sore ?

--------------------------------------

collectionByHandle(handle: $handle) {
      title
      products(first: $first) {
        edges {
          node {
            id
            title
            handle
            descriptionHtml
            description
            productType
            tags
            images(first: 1) {
              edges {
                node {
                  altText
                  src
                }
              }
            }
            compareAtPriceRange {
              minVariantPrice {
                amount
              }
              maxVariantPrice {
                amount
              }
            }
            totalInventory
          }
        }
      }
    }

-----------------------------------

0 Likes
Highlighted
Shopify Staff
Shopify Staff
179 22 29

Hey @wisslb1 

I have no issues running that query on my own test store. You may want to specify the API version in the request URL like so:

https://<storename>.myshopify.com/api/2020-10/graphql.json

 

Kevin_A | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
5 0 0
ok. thank you
0 Likes