Conversations Queries

These queries allow you to interact with conversations data.

conversation

Returns: Conversation

Arguments

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

conversations

Returns: [Conversation]

Arguments

ArgumentTypeDescription
clientIdIDID of the client (pet owner)
closedBooleanFilter by closed status
excludeEmptyBooleanExclude empty
excludeProtocolsBooleanExclude protocols
locationIdIDID of the location
onlyViewerBooleanOnly viewer
patientIdIDID of the patient
startDateTimeStarting point for the range
Example Query
query(
$clientId: ID,
$closed: Boolean,
$excludeEmpty: Boolean,
$excludeProtocols: Boolean,
$locationId: ID,
$onlyViewer: Boolean,
$patientId: ID,
$start: DateTime
) {
conversations(
clientId: $clientId,
closed: $closed,
excludeEmpty: $excludeEmpty,
excludeProtocols: $excludeProtocols,
locationId: $locationId,
onlyViewer: $onlyViewer,
patientId: $patientId,
start: $start
) {
id
# Add other fields you need
}
}
Variables
{
"clientId": "1",
"closed": true,
"excludeEmpty": true,
"excludeProtocols": true,
"locationId": "1",
"onlyViewer": true,
"patientId": "1",
"start": {}
}

conversationsPaginated

Arguments

ArgumentTypeDescription
afterStringCursor for forward pagination
beforeStringCursor for backward pagination
clientIdIDID of the client (pet owner)
closedBooleanFilter by closed status
excludeEmptyBooleanExclude empty
excludeProtocolsBooleanExclude protocols
limitIntMaximum number of results to return
locationIdIDID of the location
onlyViewerBooleanOnly viewer
patientIdIDID of the patient
startDateTimeStarting point for the range
Example Query
query(
$clientId: ID,
$closed: Boolean,
$excludeEmpty: Boolean,
$excludeProtocols: Boolean,
$limit: Int,
$locationId: ID,
$onlyViewer: Boolean,
$patientId: ID,
$start: DateTime
) {
conversationsPaginated(
clientId: $clientId,
closed: $closed,
excludeEmpty: $excludeEmpty,
excludeProtocols: $excludeProtocols,
limit: $limit,
locationId: $locationId,
onlyViewer: $onlyViewer,
patientId: $patientId,
start: $start
) {
id
# Add other fields you need
}
}
Variables
{
"clientId": "1",
"closed": true,
"excludeEmpty": true,
"excludeProtocols": true,
"limit": 1,
"locationId": "1",
"onlyViewer": true,
"patientId": "1",
"start": {}
}

openConversationsCount

Returns: Int

Arguments

ArgumentTypeDescription
locationIdrequiredID!ID of the location
Example Query
query($locationId: ID!) {
openConversationsCount(locationId: $locationId) {
id
# Add other fields you need
}
}
Variables
{
"locationId": "1"
}

unreadConversations

Returns: [Conversation]

Arguments

ArgumentTypeDescription
limitIntMaximum number of results to return
Example Query
query($limit: Int) {
unreadConversations(limit: $limit) {
id
# Add other fields you need
}
}
Variables
{
"limit": 1
}

unreadConversationsCount

Returns: Int
Example Query
query {
unreadConversationsCount {
id
# Add other fields you need
}
}