Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subgraph composition : TriggersAdapter wrapper #5695

Open
wants to merge 21 commits into
base: feat-subgraph-composition
Choose a base branch
from

Conversation

incrypto32
Copy link
Member

@incrypto32 incrypto32 commented Nov 5, 2024

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

@incrypto32 incrypto32 added this to the Subgraph Composition milestone Nov 5, 2024
@incrypto32 incrypto32 changed the title Subgraph composition blockstream Subgraph composition : TriggersAdapter wrapper Nov 5, 2024
@incrypto32 incrypto32 requested a review from mangas November 8, 2024 05:38
chain/ethereum/src/chain.rs Outdated Show resolved Hide resolved

impl UnresolvedDataSource {
#[allow(dead_code)]
pub(super) async fn resolve(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need some test coverage?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let manifest = resolve_manifest(yaml, SPEC_VERSION_1_3_0).await;

There is little testing for resolving this UnresolvedDatasource. Would you suggest anything more?

@mangas
Copy link
Contributor

mangas commented Nov 11, 2024

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 incrypto32 force-pushed the subgraph-composition-blockstream branch from cd6114d to 9069486 Compare November 12, 2024 10:28
@incrypto32 incrypto32 requested a review from mangas November 14, 2024 11:26
@incrypto32
Copy link
Member Author

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

@incrypto32 incrypto32 self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants