Joystream / hydra

A Substrate indexing framework
49 stars 44 forks source link

The Graph and the Query Node #463

Open bedeho opened 4 years ago

bedeho commented 4 years ago

The Graph

Here is a summary of my understanding of The Graph, please correct any possible misunderstandings on my part:

The Graph is

Using The Graph for our query node

There is a good chance that The Graph, both as a standard and the tools, is coming to Substrate. The timeline for when anything production ready would be available is however very uncertain.

There are a number of plausible benefits of relying on The Graph, rather than rolling our own full stack bespoke solution

Impositions of The Graph

This is the current main design constraints we must respect in order to have our API and blockchain data processors maximally transferrable to a future Substrate The Graph.

Risks

bedeho commented 4 years ago

Clarification: It appears that event handlers do indeed allow you to recover the initial transaction, and corresponding payload, responsible for the event. This means that just processing events should be sufficient to construct state for any query we would like, so long as events supply all required information about side-effects. They need not copy over tx parameters.