34 lines
759 B
GraphQL
34 lines
759 B
GraphQL
fragment CustomerProfile on Customer {
|
|
active
|
|
documentId
|
|
name
|
|
phone
|
|
photoUrl
|
|
role
|
|
telegramId
|
|
}
|
|
|
|
mutation CreateUser($name: String!, $telegramId: Long!, $phone: String!) {
|
|
createCustomer(data: { name: $name, telegramId: $telegramId, phone: $phone, role: client }) {
|
|
...CustomerProfile
|
|
}
|
|
}
|
|
|
|
mutation CreateClient($name: String!, $phone: String!) {
|
|
createCustomer(data: { name: $name, phone: $phone, role: client }) {
|
|
...CustomerProfile
|
|
}
|
|
}
|
|
|
|
query GetCustomer($telegramId: Long!) {
|
|
customers(filters: { telegramId: { eq: $telegramId } }) {
|
|
...CustomerProfile
|
|
}
|
|
}
|
|
|
|
mutation UpdateCustomerProfile($documentId: ID!, $data: CustomerInput!) {
|
|
updateCustomer(documentId: $documentId, data: $data) {
|
|
...CustomerProfile
|
|
}
|
|
}
|