graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.92k stars 980 forks source link

Subgraph composition : TriggersAdapter wrapper #5695

Open incrypto32 opened 3 weeks ago

incrypto32 commented 3 weeks ago

This PR introduces a wrapper around the TriggersAdapter to support subgraph triggers from other subgraphs. Previously, the TriggersAdapter was chain-specific, handling triggers only for individual chains. With subgraph data sources, we need a higher-level adapter to fetch entity triggers from source subgraphs without depending on any specific chain.

This PR lays the groundwork for enabling the new subgraph data source type. The changes include:

Allow subgraph datasource in manifest A wrapper for TriggersAdapter A wrapper for TriggerFilter A new trigger type specific to subgraph data sources

mangas commented 2 weeks ago

Would be good to address some of the comments, particularly around docs and comments. I also didn't see much in the way of testing. Would be great to see some test coverage around the new paths.

incrypto32 commented 1 week ago

Just addressed the comments, and the suggestion for not using the WriteStore