mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Login, Sign Up, Log Out, and checkout & customer association
This commit is contained in:
8
framework/shopify/utils/queries/get-customer-id-query.ts
Normal file
8
framework/shopify/utils/queries/get-customer-id-query.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const getCustomerQuery = /* GraphQL */ `
|
||||
query getCustomerId($customerAccessToken: String!) {
|
||||
customer(customerAccessToken: $customerAccessToken) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`
|
||||
export default getCustomerQuery
|
16
framework/shopify/utils/queries/get-customer-query.ts
Normal file
16
framework/shopify/utils/queries/get-customer-query.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export const getCustomerQuery = /* GraphQL */ `
|
||||
query getCustomer($customerAccessToken: String!) {
|
||||
customer(customerAccessToken: $customerAccessToken) {
|
||||
id
|
||||
firstName
|
||||
lastName
|
||||
displayName
|
||||
email
|
||||
phone
|
||||
tags
|
||||
acceptsMarketing
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
`
|
||||
export default getCustomerQuery
|
@@ -4,3 +4,4 @@ export { default as getAllProductsQuery } from './get-all-products-query'
|
||||
export { default as getAllProductsPathtsQuery } from './get-all-products-paths-query'
|
||||
export { default as getCheckoutQuery } from './get-checkout-query'
|
||||
export { default as getAllPagesQuery } from './get-all-pages-query'
|
||||
export { default as getCustomerQuery } from './get-checkout-query'
|
||||
|
Reference in New Issue
Block a user