i have an issue with api front end

wisslb1
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
Kevin_A
Shopify Staff
Shopify Staff
311 42 54

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? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

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