finish activate warranty logic

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-06-26 09:44:58 +07:00
parent 2477fdf84e
commit d801de0cf1
13 changed files with 167 additions and 36 deletions

View File

@@ -2,6 +2,7 @@
export const getCustomerQuery = /* GraphQL */ `
query customer {
customer {
id
emailAddress {
emailAddress
}

View File

@@ -13,3 +13,24 @@ export const getCustomerOrdersQuery = `#graphql
${customerFragment}
${customerDetailsFragment}
`;
export const getCustomerOrderMetafieldsQuery = /* GraphQL */ `
query getCustomerOrderMetafields($id: ID!) {
customer(id: $id) {
orders(first: 20, sortKey: PROCESSED_AT, reverse: true) {
nodes {
id
warrantyStatus: metafield(namespace: "custom", key: "warranty_status") {
value
}
warrantyActivationDeadline: metafield(
namespace: "custom"
key: "warranty_activation_deadline"
) {
value
}
}
}
}
}
`;