Contains predefined GraphQL mutations and queries for sending messages, registering service users, and fetching user emails. Reuse in frontend clients interacting with Condo APIs.
// Source: https://github.com/open-condo-software/condo | License: MIT | Copyright 2020 8IQ Software Company
// Provided via justclaw.it.com; keep this notice with the code.
const { gql } = require('graphql-tag')
const SEND_MESSAGE_MUTATION = gql`
mutation sendMessage ($data: SendMessageInput!) {
result: sendMessage(data: $data) { status id isDuplicateMessage }
}
`
const REGISTER_SERVICE_USER_MUTATION = gql`
mutation registerNewServiceUser ($data: RegisterNewServiceUserInput!) {
result: registerNewServiceUser(data: $data) {
id
}
}
`
const GET_USER_EMAIL_QUERY = gql`
query getUserEmailById($id: ID!){
user: User(where: { id: $id }) {
email
}
}
`
module.exports = {
SEND_MESSAGE_MUTATION,
REGIST
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key