2022-02-21 13:32:38 +00:00
|
|
|
import { gql } from "@apollo/client";
|
2020-07-07 10:14:12 +00:00
|
|
|
|
|
|
|
export const customerFragment = gql`
|
2022-03-09 08:56:55 +00:00
|
|
|
fragment Customer on User {
|
2020-07-07 10:14:12 +00:00
|
|
|
id
|
|
|
|
email
|
|
|
|
firstName
|
|
|
|
lastName
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const customerDetailsFragment = gql`
|
2022-03-09 08:56:55 +00:00
|
|
|
fragment CustomerDetails on User {
|
|
|
|
...Customer
|
|
|
|
...Metadata
|
2020-07-07 10:14:12 +00:00
|
|
|
dateJoined
|
|
|
|
lastLogin
|
|
|
|
defaultShippingAddress {
|
2022-03-09 08:56:55 +00:00
|
|
|
...Address
|
2020-07-07 10:14:12 +00:00
|
|
|
}
|
|
|
|
defaultBillingAddress {
|
2022-03-09 08:56:55 +00:00
|
|
|
...Address
|
2020-07-07 10:14:12 +00:00
|
|
|
}
|
|
|
|
note
|
|
|
|
isActive
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const customerAddressesFragment = gql`
|
2022-03-09 08:56:55 +00:00
|
|
|
fragment CustomerAddresses on User {
|
|
|
|
...Customer
|
2020-07-07 10:14:12 +00:00
|
|
|
addresses {
|
2022-03-09 08:56:55 +00:00
|
|
|
...Address
|
2020-07-07 10:14:12 +00:00
|
|
|
}
|
|
|
|
defaultBillingAddress {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
defaultShippingAddress {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|