mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
77 lines
1.5 KiB
TypeScript
77 lines
1.5 KiB
TypeScript
export const CUSTOMER_QUERY = `#graphql
|
|
query CustomerDetails(
|
|
$customerAccessToken: String!
|
|
$country: CountryCode
|
|
$language: LanguageCode
|
|
) @inContext(country: $country, language: $language) {
|
|
customer(customerAccessToken: $customerAccessToken) {
|
|
firstName
|
|
lastName
|
|
phone
|
|
email
|
|
defaultAddress {
|
|
id
|
|
formatted
|
|
firstName
|
|
lastName
|
|
company
|
|
address1
|
|
address2
|
|
country
|
|
province
|
|
city
|
|
zip
|
|
phone
|
|
}
|
|
addresses(first: 6) {
|
|
edges {
|
|
node {
|
|
id
|
|
formatted
|
|
firstName
|
|
lastName
|
|
company
|
|
address1
|
|
address2
|
|
country
|
|
province
|
|
city
|
|
zip
|
|
phone
|
|
}
|
|
}
|
|
}
|
|
orders(first: 250, sortKey: PROCESSED_AT, reverse: true) {
|
|
edges {
|
|
node {
|
|
id
|
|
orderNumber
|
|
processedAt
|
|
financialStatus
|
|
fulfillmentStatus
|
|
currentTotalPrice {
|
|
amount
|
|
currencyCode
|
|
}
|
|
lineItems(first: 2) {
|
|
edges {
|
|
node {
|
|
variant {
|
|
image {
|
|
url
|
|
altText
|
|
height
|
|
width
|
|
}
|
|
}
|
|
title
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|