balancer-subgraph
balancer-subgraph copied to clipboard
Transactions Schema Cleanup
Background
The Transaction
schema can be cleaned up and make tighter guarantees for data.
Require event
Transaction.event
is always set - update the schema to require this value.
https://thegraph.com/explorer/subgraph/balancer-labs/balancer
Query
{
transactions(
where:{
event: null
}
) {
id
}
}
Result
{
"data": {
"transactions": []
}
}
Remove action
Transaction.action
is never set. Remove from schema.
Query
{
transactions(
where:{
action_not: null
}
) {
id
}
}
Result
{
"data": {
"transactions": []
}
}
Remove sender
Transaction.sender
is never set. Remove from schema.
Query
{
transactions(
where:{
sender_not: null
}
) {
id
}
}
Result
{
"data": {
"transactions": []
}
}
I would add to this to make 1 tx entity per tx and tx_hash as ID. As it's currently done is super confusing for developers.