Skip to main content

Counter Triples

Query triples along with their counter (opposing) triples to see both sides of a claim.

Query Structure​

query GetTripleWithCounter($id: String!, $curveId: numeric!) {
triple(term_id: $id) {
term_id
subject { label }
predicate { label }
object { label }
term {
vaults(where: { curve_id: { _eq: $curveId } }) {
total_shares
market_cap
}
}
counter_term {
vaults(where: { curve_id: { _eq: $curveId } }) {
total_shares
market_cap
}
}
}
}

Interactive Example​

Query

query GetTripleWithCounter($id: String!, $curveId: numeric!) {
  triple(term_id: $id) {
    term_id
    subject { label }
    predicate { label }
    object { label }
    term {
      vaults(where: { curve_id: { _eq: $curveId } }) {
        total_shares
        market_cap
        position_count
      }
    }
    counter_term_id
    counter_term {
      vaults(where: { curve_id: { _eq: $curveId } }) {
        total_shares
        market_cap
        position_count
      }
    }
  }
}

Variables

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

Best Practices​

  1. Include counter_term for opposing positions
  2. Compare market caps to see which side is favored
  3. Filter by curve_id for specific vaults
  4. Show both sides in UI for balanced view