## Description
Enables writing graphql queries inline as data tests.
Spins up a validator simulator + indexer + graphql. We run transactions
against the simulator and query the state from graphql or other means.
**Sample input snippet**
```
//# advance-epoch
//# view-checkpoint
//# run-graphql
{
checkpoint {
sequenceNumber
digest
}
}
```
**Output snippet**
```
task 7 'advance-epoch'. lines 44-44:
Epoch advanced: 0
task 8 'view-checkpoint'. lines 46-46:
CheckpointSummary { epoch: 0, seq: 2, content_digest: 2m7Qe2QoUsfwuwDE7ZwjmcRa1wtVgVDbDGavnLAfFEzA,
epoch_rolling_gas_cost_summary: GasCostSummary { computation_cost: 2000000, storage_cost: 7873600, storage_rebate: 978120, non_refundable_storage_fee: 9880 }}
task 9 'run-graphql'. lines 48-55:
{
"data": {
"checkpoint": {
"sequenceNumber": 2,
"digest": "GkxJW4jJDRrXuN5Z8ZgqxBHmG12vywoMCP7JTSzeLqQn"
}
},
"extensions": {
"usage": {
"nodes": 3,
"depth": 2,
"variables": 0,
"fragments": 0,
"query_payload": 52
}
}
}
```
**Explanation of changes:**
1. github workflow: enables the data tests in CI.
2. simulacrum: allows `ObjectStore` trait impl work for `PersistedStore`
3. sui-graphql-e2e-tests: this is where the data tests will live. An
example test is placed there.
4. sui-graphql: add client response pretty print (for use in data test),
remove old data test, and add a catchup logic to make sure indexer is up
to date for queries.
5. sui-indexer: expose trait to allow syncing in (4).
6. sui-rest-api: allows `NodeStateGetter` trait impl work for
`PersistedStore`, needed for serving data to indexer.
7. sui-transactional-test-runner: add arg for running graphql inline,
add read-replica to persisted store so we can serve indexer while
writing to state, and enable graphql querying in adapter.
**Upcoming changes:**
1. Better output formatting
2. Graphql variables (by explicit specification, and by capturing the
named addresses/ids in the transactional runner)
3. Loading state from file; to avoid recreating state each time
4. General cleanups of todos, consts, etc
5. Use less unwraps/expects
6. JSON RPC & SQL support?
7. More config options for server
8. More graphql response options e.g headers
9. More examples
10. Better perf & better test isolation (esp DB)
## Test Plan
Data tests
---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.
### Type of Change (Check all that apply)
- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
### Release notes