e2e test subgraph integration
Ideas for implementing e2e integration with the graph:
- [Discarded] Launch a graph-node for each fork we create during each test run. This is discarded because the subgraph would take too long to index.
- Have a graph node running on a cloud service, with a Tenderly fork as the RPC. We would stop creating a new fork for each test run. We could have a cron job that creates a new fork once a week.
- [Very custom idea] graph-node uses a PostgreSQL database to store indexed information. If we could "duplicate/fork" a snapshot of the database to launch a new graph-node pointing to a new RPC, we wouldn't have to index from scratch, so there would be no waiting time.
Replace a Contract and Keep its History With Grafting: https://thegraph.com/docs/en/cookbook/grafting/ "Grafting reuses the data from an existing subgraph and starts indexing it at a later block."
https://thegraph.com/docs/en/developing/creating-a-subgraph/#grafting-onto-existing-subgraphs "When a subgraph whose manifest contains a graft block is deployed, Graph Node will copy the data of the base subgraph up to and including the given block and then continue indexing the new subgraph from that block on."
test mocking on #1213