2025-01-06 17:59:44 +03:00

28 lines
605 B
GraphQL

fragment CustomerProfile on Customer {
active
documentId
name
phone
photoUrl
role
telegramId
}
mutation CreateCustomer($name: String!, $telegramId: Long!, $phone: String!) {
createCustomer(data: { name: $name, telegramId: $telegramId, 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
}
}