Skip to content

Instantly share code, notes, and snippets.

@topshef
topshef / demo1.graphql
Created September 8, 2025 10:50
select all tx where operator id =xxx and contains any xfer (hbar or ft) where withdrawal is from account yyyy since date zzz
#https://discord.com/channels/1011406343053254707/1283157792626311281/1334129547582505000
query TransfersQuery($verifierId: bigint, $subjectId: bigint, $fromConsensusTime: bigint) {
hbarTransfers: crypto_transfer(
where: {
entity_id: { _eq: $subjectId }
amount: { _lt: 0 }
transaction: { payer_account_id: { _eq: $verifierId }, consensus_timestamp: { _gte: $fromConsensusTime } }
}
order_by: { transaction: { consensus_timestamp: desc } }
) {