fragment CustomerFields 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 }) { documentId } } query GetCustomer($phone: String, $telegramId: Long) { customers(filters: { or: [{ phone: { eq: $phone } }, { telegramId: { eq: $telegramId } }] }) { ...CustomerFields } } query GetCustomerMasters($phone: String, $telegramId: Long) { customers( filters: { or: [{ phone: { eq: $phone } }, { telegramId: { eq: $telegramId } }] and: [{ active: { eq: true } }] } ) { documentId masters { ...CustomerFields } } } query GetCustomerClients($phone: String, $telegramId: Long) { customers( filters: { or: [{ phone: { eq: $phone } }, { telegramId: { eq: $telegramId } }] and: [{ active: { eq: true } }] } ) { documentId clients { ...CustomerFields } } } mutation UpdateCustomerProfile($documentId: ID!, $data: CustomerInput!) { updateCustomer(documentId: $documentId, data: $data) { ...CustomerFields } }