Conversations Mutations

These mutations allow you to interact with conversations data.

createConversation

Returns: Conversation

Arguments

ArgumentTypeDescription
clientIdrequiredID!ID of the client (pet owner)
inputConversationInputInput data for conversation operation
patientIdIDID of the patient
subjectStringSubject
Example Query
mutation(
$clientId: ID!,
$input: ConversationInput,
$patientId: ID,
$subject: String
) {
createConversation(
clientId: $clientId,
input: $input,
patientId: $patientId,
subject: $subject
) {
id
# Add other fields you need
}
}
Variables
{
"clientId": "1",
"input": {},
"patientId": "1",
"subject": "example"
}

deleteMessage

Returns: Message

Arguments

ArgumentTypeDescription
idrequiredID!Unique identifier
Example Query
mutation($id: ID!) {
deleteMessage(id: $id) {
id
# Add other fields you need
}
}
Variables
{
"id": "1"
}

sendMessage

Returns: Message

Arguments

ArgumentTypeDescription
attachments[Upload]List of file attachments
bodyrequiredString!Main content or message body
closeBooleanClose
conversationIdrequiredID!ID of the conversation thread
messageIdIDID of the message
Example Query
mutation(
$attachments: [Upload],
$body: String!,
$close: Boolean,
$conversationId: ID!,
$messageId: ID
) {
sendMessage(
attachments: $attachments,
body: $body,
close: $close,
conversationId: $conversationId,
messageId: $messageId
) {
id
# Add other fields you need
}
}
Variables
{
"attachments": {},
"body": "example",
"close": true,
"conversationId": "1",
"messageId": "1"
}

startConversation

Returns: Conversation

Arguments

ArgumentTypeDescription
attachments[ConversationSetAttachment]List of file attachments
bodyrequiredString!Main content or message body
clientIdrequiredID!ID of the client (pet owner)
inputrequiredConversationInput!Input
Example Query
mutation(
$attachments: [ConversationSetAttachment],
$body: String!,
$clientId: ID!,
$input: ConversationInput!
) {
startConversation(
attachments: $attachments,
body: $body,
clientId: $clientId,
input: $input
) {
id
# Add other fields you need
}
}
Variables
{
"attachments": {},
"body": "example",
"clientId": "1",
"input": {}
}

updateConversation

Returns: Conversation

Arguments

ArgumentTypeDescription
idrequiredID!Unique identifier
inputrequiredConversationInput!Input
Example Query
mutation(
$id: ID!,
$input: ConversationInput!
) {
updateConversation(
id: $id,
input: $input
) {
id
# Add other fields you need
}
}
Variables
{
"id": "1",
"input": {}
}