EventData is a GraphQL union with seven variants. The __typename field identifies the variant:
A trade. See SwapEventData.
An LP add. See MintEventData.
An LP remove. See BurnEventData.
V2 reserve sync. See SyncEventData.
V3 fee collection. See CollectEventData.
V3 protocol fee collection. See CollectProtocolEventData.
Balancer V2 / Uniswap V4 pool rebalance. See PoolBalanceChangedEventData.
Usage
getTokenEvents returns Swap / Mint / Burn / PoolBalanceChanged payloads. Sync / Collect / CollectProtocol are short-circuited to empty by the query (Codex contract).