From 71ee33b0a561c8c7dd3ae98ea440c4dd3bf7f670 Mon Sep 17 00:00:00 2001 From: John Clark Date: Thu, 29 Aug 2024 10:10:36 +0100 Subject: [PATCH] Add merchandise fields to closer match what was originally returned in VariantFragment https://github.com/Shopify/js-buy-sdk/blob/main/src/graphql/VariantFragment.graphql --- .gitignore | 5 ++++- src/graphql/CartLineFragment.graphql | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a6a5cda8..133beb1e2 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,7 @@ secrets.json .nvmrc # VSCode settings -.vscode \ No newline at end of file +.vscode + +# PHPStorm settings +.idea diff --git a/src/graphql/CartLineFragment.graphql b/src/graphql/CartLineFragment.graphql index 8e5ed5fa8..1f6bbf6a3 100644 --- a/src/graphql/CartLineFragment.graphql +++ b/src/graphql/CartLineFragment.graphql @@ -3,6 +3,33 @@ fragment CartLineFragment on CartLine { merchandise { ... on ProductVariant { id + title + image { + id + src: url + altText + width + height + } + product { + id + handle + title + } + weight + available: availableForSale + sku + selectedOptions { + name + value + } + unitPriceMeasurement { + measuredType + quantityUnit + quantityValue + referenceUnit + referenceValue + } } } quantity