2024-12-23 15:14:18 +03:00

35 lines
760 B
GraphQL

mutation Register($identifier: String!, $password: String!, $email: String!) {
register(input: { username: $identifier, password: $password, email: $email }) {
jwt
user {
username
}
}
}
mutation Login($identifier: String!, $password: String!) {
login(input: { identifier: $identifier, password: $password }) {
jwt
}
}
mutation CreateCustomer($name: String!, $telegramId: Long!, $phone: String!) {
createCustomer(data: { name: $name, telegramId: $telegramId, phone: $phone, role: client }) {
documentId
name
telegramId
phone
role
active
createdAt
updatedAt
publishedAt
}
}
query GetCustomer($telegramId: Long!) {
customers(filters: { telegramId: { eq: $telegramId } }) {
name
}
}