From 0b14f8c6ac85ae898d13dbd503fedb421076bc06 Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Wed, 15 Feb 2023 15:50:39 +0100 Subject: [PATCH 1/8] Update package-lock.json --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1d38e5d..a69af2ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "nuxtjs-woocommerce", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { - "version": "1.0.2", + "version": "1.0.3", "hasInstallScript": true, "dependencies": { "@formkit/nuxt": "^1.0.0-beta.15", From 6a8c488fe81fc4390507e18c5fa9ff198ba1ca20 Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Thu, 16 Feb 2023 00:52:45 +0100 Subject: [PATCH 2/8] Testing fix --- apollo/mutations/ADD_TO_CART_MUTATION.gql | 72 +++++++------- apollo/queries/GET_CART_QUERY.gql | 96 ++++++++----------- apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql | 4 +- components/Products/ProductsSingleProduct.vue | 2 +- 4 files changed, 82 insertions(+), 92 deletions(-) diff --git a/apollo/mutations/ADD_TO_CART_MUTATION.gql b/apollo/mutations/ADD_TO_CART_MUTATION.gql index dfdfe876..d4046f06 100644 --- a/apollo/mutations/ADD_TO_CART_MUTATION.gql +++ b/apollo/mutations/ADD_TO_CART_MUTATION.gql @@ -1,51 +1,55 @@ -mutation($input: AddToCartInput!) { +mutation ($input: AddToCartInput!) { addToCart(input: $input) { cartItem { key product { - id - databaseId - name - description - type - onSale - slug - averageRating - reviewCount - image { + node { id - sourceUrl - altText - } - galleryImages { - nodes { + databaseId + name + description + type + onSale + slug + averageRating + reviewCount + image { id sourceUrl altText } + galleryImages { + nodes { + id + sourceUrl + altText + } + } } } variation { - id - databaseId - name - description - type - onSale - price - regularPrice - salePrice - image { + node { id - sourceUrl - altText - } - attributes { - nodes { + databaseId + name + description + type + onSale + price + regularPrice + salePrice + image { id - attributeId - name - value + sourceUrl + altText + } + attributes { + nodes { + id + attributeId + name + value + } } } } diff --git a/apollo/queries/GET_CART_QUERY.gql b/apollo/queries/GET_CART_QUERY.gql index 47d39e24..f53f4e96 100644 --- a/apollo/queries/GET_CART_QUERY.gql +++ b/apollo/queries/GET_CART_QUERY.gql @@ -4,54 +4,58 @@ nodes { key product { - id - databaseId - name - description - type - onSale - slug - averageRating - reviewCount - image { + node { id - sourceUrl - srcSet - altText - title - } - galleryImages { - nodes { + databaseId + name + description + type + onSale + slug + averageRating + reviewCount + image { id sourceUrl srcSet altText title } + galleryImages { + nodes { + id + sourceUrl + srcSet + altText + title + } + } } } variation { - id - databaseId - name - description - type - onSale - price - regularPrice - salePrice - image { + node { id - sourceUrl - srcSet - altText - title - } - attributes { - nodes { + databaseId + name + description + type + onSale + price + regularPrice + salePrice + image { id - name - value + sourceUrl + srcSet + altText + title + } + attributes { + nodes { + id + name + value + } } } } @@ -61,25 +65,7 @@ subtotalTax } } - appliedCoupons { - nodes { - id - databaseId - discountType - amount - dateExpiry - products { - nodes { - id - } - } - productCategories { - nodes { - id - } - } - } - } + subtotal subtotalTax shippingTax diff --git a/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql b/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql index 2d3fdfa6..3ad5eed6 100644 --- a/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql +++ b/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql @@ -25,12 +25,12 @@ query Product($id: ID!) { salePrice regularPrice databaseId - paColors { + allPaColors { nodes { name } } - paSizes { + allPaSizes { nodes { name } diff --git a/components/Products/ProductsSingleProduct.vue b/components/Products/ProductsSingleProduct.vue index 43f6d7fc..b5ecdc48 100644 --- a/components/Products/ProductsSingleProduct.vue +++ b/components/Products/ProductsSingleProduct.vue @@ -1,5 +1,5 @@