Developer
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Last updated Oct 29, 2025

Conversation has message

The ConversationHasMessage relationship represents the link between an external conversation and an external message within the Teamwork Graph. It allows you to:

  • Retrieve messages within a specific conversation
  • Find which conversation a message belongs to
  • Traverse and analyze conversation-message relationships

Relationship type: Canonical

From object typeTo object type
External conversation - ati:cloud:graph:conversationExternal message - ati:cloud:graph:message

Cypher

We recommend using parameterized Cypher queries rather than placing parameters directly in the query string. This helps improve performance.

Forward query

GraphQL
1
2
query ConversationHasMessage_CypherQuery($cypherQuery: String!, $params: JSON!) {
 graphStore @optIn(to: ["GraphStore", "GraphStoreCypherQueryV2"]) {
  cypherQueryV2(query: $cypherQuery, params: $params) {
   edges {
    node {
     columns {
      key
      value {. on GraphStoreCypherQueryV2NodeList {
        nodes {
         data {. on ExternalMessage {
           id
          }
         }
        }
       }. on GraphStoreCypherQueryV2AriNode {
        data {. on ExternalMessage {
          id
         }
        }
       }. on GraphStoreCypherQueryV2BooleanObject {
        bool_val: value
       }. on GraphStoreCypherQueryV2IntObject {
        int_val: value
       }. on GraphStoreCypherQueryV2FloatObject {
        float_val: value
       }. on GraphStoreCypherQueryV2StringObject {
        str_val: value
       }
      }
     }
    }
   }
  }
 }
}
Params
1
2
{
 "cypherQuery": "MATCH (conversation:GraphConversation {ari: $id})-[:conversation_has_message]->(message:GraphMessage) RETURN message",
 "params": {
  "id": "$id"
 }
}

Inverse query

GraphQL
1
2
query ConversationHasMessage_CypherQuery($cypherQuery: String!, $params: JSON!) {
 graphStore @optIn(to: ["GraphStore", "GraphStoreCypherQueryV2"]) {
  cypherQueryV2(query: $cypherQuery, params: $params) {
   edges {
    node {
     columns {
      key
      value {. on GraphStoreCypherQueryV2NodeList {
        nodes {
         data {. on ExternalConversation {
           id
          }
         }
        }
       }. on GraphStoreCypherQueryV2AriNode {
        data {. on ExternalConversation {
          id
         }
        }
       }. on GraphStoreCypherQueryV2BooleanObject {
        bool_val: value
       }. on GraphStoreCypherQueryV2IntObject {
        int_val: value
       }. on GraphStoreCypherQueryV2FloatObject {
        float_val: value
       }. on GraphStoreCypherQueryV2StringObject {
        str_val: value
       }
      }
     }
    }
   }
  }
 }
}
Params
1
2
{
 "cypherQuery": "MATCH (conversation:GraphConversation)-[:conversation_has_message]->(message:GraphMessage {ari: $id}) RETURN conversation",
 "params": {
  "id": "$id"
 }
}

Rate this page: