Skip to main content

Entities & Sample Queries

TWAB Delegator - Entities

Ticket

FieldTypeDescription
idID!Ticket ID
accounts[Account!]!Accounts associated with the ticket
delegations[Delegation!]!Delegations associated with the ticket

Delegation

FieldTypeDescription
idID!Delegator ID
delegatorAccount!Delegator address
delegateeAccount!Delegatee address
balanceBigInt!Total amount delegated
lockUntilBigInt!Duration for delegation
ticketTicketTicket associated with delegation

Account

FieldTypeDescription
idID!Account ID
delegations[Delegation!]!Delegations made by user
ticketTicketTicket associated with user

Sample Queries

Below are some sample queries you can use to gather information from the TWAB Delegator subgraph.

You can build your own queries using a GraphQL Explorer and enter your endpoint to limit the data to exactly what you need.

Delegations

Description: This query fetches the data for delegators, delegatees, time duration of delegation, and balance.

{
delegations {
delegator {
id
delegations {
balance
lockUntil
}
}
delegatee {
id
delegations {
balance
lockUntil
}
}
}
}

Accounts

Description: This query fetches user accounts and their delegations.

{
accounts {
id
delegations {
id
lockUntil
balance
}
}
}