I’m getting an error “Cannot read properties of undefined” from the src/api/operations-builder.ts (98:25)
file from the nextjs-shopify repo. The cause looks like it’s because of an XHR request to https://my-store.myshopify.com/api/2020-07/graphql
(“my-store” is replaced with a fake name here).
This happens when I try to add a Product Grid component to the page. The Product List shows up just fine in the Builder editor, but it seems to have a connection problem in the app shown in the editor once the Product Grid component has been added to the page. Here’s the request header copied from the Chrome console…
- :authority: my-store.myshopify.com
- :method: POST
- :path: /api/2020-07/graphql
- :scheme: https
- accept: application/json
- accept-encoding: gzip, deflate, br
- accept-language:
- content-length: 3307
- content-type: application/json
- origin: http://localhost:3000
- referer: http://localhost:3000/
- sec-ch-ua: " Not A;Brand";v=“99”, “Chromium”;v=“96”, “Google Chrome”;v=“96”
- sec-ch-ua-mobile: ?0
- sec-ch-ua-platform: “macOS”
- sec-fetch-dest: empty
- sec-fetch-mode: cors
- sec-fetch-site: cross-site
- sec-gpc: 1
- user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36
- x-sdk-variant: javascript
- x-sdk-version: 2.11.0
- x-shopify-storefront-access-token: checked-and-matches-in-shopify