-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data fetch has stopped working in latest version #850
Comments
I am having the same issue with |
I fixed it by changing the script tag to version 2.4.0 instead of 1.0.0..... lame fix but that did it for me |
Could you elaborate? You said in your opening comment, that you already upgraded to the latest version and the error still existed? Nevermind: it was a caching issue in my case 🙈 |
Sure, in my html file I have a <script> tag for the buy-button-js. Previously, I assumed I should be using npm or something else like that but silly me didn't think tl change the actual js file from the script tag. Try using this line <script src="http://sdks.shopifycdn.com/buy-button/2.4.0/buybutton.js"></script> |
There are some changes with the buy-button-js library on the latest version with the addition of MoneyV2 and 'presentmentPrices'when fetching data, it's not happy with the values returned.
I'm unsure what else to do.
This has broken my app and I can't find any steps on upgrading the buy-button-js when fetching data to return my products.
How do I rectify this when I've already updated the buy-button-js with npm to the latest version?
"@shopify/buy-button-js": "^2.4.0",
(3) [{…}, {…}, {…}] 0 : extensions : {code: 'selectionMismatch', nodeName: "field 'price'", typeName: 'MoneyV2'} locations : [{…}] message : "Field must have selections (field 'price' returns MoneyV2 but has no selections. Did you mean 'price { ... }'?)" path : Array(2) 0 : "fragment VariantFragment" 1 : "price" length : 2 [[Prototype]] : Array(0) [[Prototype]] : Object 1 : extensions : {code: 'undefinedField', typeName: 'ProductVariant', fieldName: 'presentmentPrices'} locations : [{…}] message : "Field 'presentmentPrices' doesn't exist on type 'ProductVariant'" path : Array(2) 0 : "fragment VariantFragment" 1 : "presentmentPrices" length : 2 [[Prototype]] : Array(0) [[Prototype]] : Object 2 : extensions : {code: 'selectionMismatch', nodeName: "field 'compareAtPrice'", typeName: 'MoneyV2'} locations : [{…}] message : "Field must have selections (field 'compareAtPrice' returns MoneyV2 but has no selections. Did you mean 'compareAtPrice { ... }'?)" path : Array(2) 0 : "fragment VariantFragment" 1 : "compareAtPrice" length : 2 [[Prototype]] : Array(0) [[Prototype]] : Object length : 3 [[Prototype]] : Array(0)
The text was updated successfully, but these errors were encountered: