For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
I am having problems with my query. I am trying to access the storefront API to query the customer's information in the checkout extensibility.
I know we can do useCustomer or buyerIdentity but that's if you're logged in. I want to be able to query the customer's information through email in case theyre not logged in.
useEffect(() => { query( `query getCustomer ($first: Int!, $email: String!) { customer(first: $first, query: $email) { id email firstName lastName } }`, { variables: { first: 1, email: `email:${customerEmail}` }, } ).then(({data, errors}) => { console.log('data', data); }) },[customerEmail, shippingAddress, customer, query])
and I get this error
message: "Field 'customer' is missing required arguments: customerAccessToken"
I'd like to bump this ticket. We are also having the same issue with only being able to view the data when the user is logged in.
If not, we are getting the same error; "Field 'customer' is missing required arguments: customerAccessToken"
Please advise Shopify?