Skip to main content

Single Triple Query

Fetch detailed information about a specific triple using its term ID.

Query Structure​

query GetTriple($id: String!) {
triple(term_id: $id) {
term_id
created_at
subject {
term_id
label
image
}
predicate {
term_id
label
}
object {
term_id
label
image
}
}
}

Interactive Example​

Query

query GetTriple($id: String!) {
  triple(term_id: $id) {
    term_id
    created_at
    subject { term_id label image }
    predicate { term_id label }
    object { term_id label image }
  }
}

Variables

Click "Run Query" to execute the GraphQL query and see results

Best Practices​

  1. Use primary key lookup for single triples
  2. Include vault data when needed for market information
  3. Query counter triple to see opposing positions
  4. Handle null responses when triple doesn't exist