You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
variantBySelectedOptions field doesn't exist on Product #131
Sorry. That was exactly the issue. I was using the Shopify GraphiQL App, but I didn't realize it only used the Admin API.
Also here is an issue I noticed, that I want to just document in case its helpful for anyone in the future. When using JSON.stringify, the method applies quotes to both the key and the value causing the string to look like '[{"name": "Size", "value": "King/Cal King" }]', this for some reason causes a parsing error in the request, so you have to strip the quotes out of the keys in order for it to look like this '[{name: "Size", value: "King/Cal King" }]';
Activity
swalkinshaw commentedon Feb 26, 2021
It definitely still exists.
🤔 are you sure you're using the Storefront API and not the Admin API? Only easy explanation I could think of
jibinycricket commentedon Feb 26, 2021
Sorry. That was exactly the issue. I was using the Shopify GraphiQL App, but I didn't realize it only used the Admin API.
Also here is an issue I noticed, that I want to just document in case its helpful for anyone in the future. When using
JSON.stringify, the method applies quotes to both the key and the value causing the string to look like'[{"name": "Size", "value": "King/Cal King" }]', this for some reason causes a parsing error in the request, so you have to strip the quotes out of the keys in order for it to look like this'[{name: "Size", value: "King/Cal King" }]';My query looked like this
If there's a better way to stringify the object please let me know