Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add block withdrawals in graphQL response (#10463)
In the context of data collection and indexing, I need to make one graphQL request per block to retrieve several informations. Currently withdrawals are not implemented in graphQL. This PR adds it. **Request** ```graphQL { block(number: 19938542) { number withdrawals { index validator address amount } } } ``` **Response** ```json { "data": { "block": { "number": 19938542, "withdrawals": [ { "index": 46457291, "validator": 425887, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11db8a5" }, { "index": 46457292, "validator": 425888, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e2885" }, { "index": 46457293, "validator": 425889, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e9866" }, { "index": 46457294, "validator": 425890, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e5524" }, { "index": 46457295, "validator": 425891, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e00fc" }, { "index": 46457296, "validator": 425892, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11ec53c" }, { "index": 46457297, "validator": 425893, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e2f24" }, { "index": 46457298, "validator": 425894, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11d866b" }, { "index": 46457299, "validator": 425895, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e4bb3" }, { "index": 46457300, "validator": 425896, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11deeb5" }, { "index": 46457301, "validator": 425897, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e0e99" }, { "index": 46457302, "validator": 425898, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11ee082" }, { "index": 46457303, "validator": 425899, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11e4283" }, { "index": 46457304, "validator": 425900, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11ed7b6" }, { "index": 46457305, "validator": 425901, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x11d41ef" }, { "index": 46457306, "validator": 425902, "address": "0x4B5E9A6Ab1B87D4Df850178AD2807c1E3E3BA33E", "amount": "0x3c88641" } ] } } } ```
- Loading branch information