From 8e29a0b010a0c3b857eaaa4b7503052752e088a9 Mon Sep 17 00:00:00 2001 From: Zaiste Date: Tue, 11 May 2021 14:28:34 +0200 Subject: [PATCH] saleor: handle customer find via refresh temporary solution --- .../utils/queries/get-customer-query.ts | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/framework/saleor/utils/queries/get-customer-query.ts b/framework/saleor/utils/queries/get-customer-query.ts index 87e37e68d..6a12c0fcc 100644 --- a/framework/saleor/utils/queries/get-customer-query.ts +++ b/framework/saleor/utils/queries/get-customer-query.ts @@ -1,15 +1,19 @@ +// FIXME move to `mutations/` @zaiste export const getCustomerQuery = /* GraphQL */ ` - query getCustomer($customerAccessToken: String!) { - customer(customerAccessToken: $customerAccessToken) { - id - firstName - lastName - displayName - email - phone - tags - acceptsMarketing - createdAt + mutation getCustomer($customerAccessToken: String!) { + tokenRefresh(csrfToken: $customerAccessToken) { + token + user { + id + email + firstName + lastName + dateJoined + } + errors { + code + message + } } } `