Unclear API Deprecation Notice for querying products.

Unclear API Deprecation Notice for querying products.

adamgen
Shopify Partner
10 0 5

Running this simple query:

 

  query SearchProducts($search: String) {
    products(first: 50, query: $search, sortKey: UPDATED_AT) {
      nodes {
        title
        featuredImage {
          originalSrc
          src
          url
          width
          height
          id
        }
      }
    }
  }

Results with the following error:

 

[shopify-api/WARNING] API Deprecation Notice 7/24/2023, 1:48:21 PM : {"message":"https://shopify.dev/api/usage/versioning#deprecation-practices","path":"https://better-products-demo.myshopify.com/admin/api/2023-07/graphql.json","body":"{\"query\":\"\\n  query SearchProducts($search: String) {\\n    products(first: 50, query: $search, sortK..."}  -  Stack Trace: Error
    at NewHttpClient.<anonymous> (/Users/adam/clients/sparkcro/sparkcro-app/node_modules/@shopify/shopify-api/lib/clients/http_client/http_client.js:237:35)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/adam/clients/sparkcro/sparkcro-app/node_modules/tslib/tslib.js:164:62)

I've tried to tinker with it, but I don't know what causes it.

 

Fractional VP R&D for E-commerce
Reply 1 (1)

adamgen
Shopify Partner
10 0 5

Seems that it's the bodyHtml on product and src with originSrc on featuredImage that caused it.

Fractional VP R&D for E-commerce