Skip to content

gnd: Support multiple subgraphs, grafting, subgraph composition in dev mode #6000

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

Open
wants to merge 8 commits into
base: krishna/graph-dev
Choose a base branch
from

Conversation

incrypto32
Copy link
Member

@incrypto32 incrypto32 commented May 12, 2025

Supporting multiple subgraphs in dev mode is a bit tricky since FileLinkResolver needs a base dir, this works well for a single subgraph since we can scope the resolver to the build directory of that subgraph, but when there are multiple subgraphs, we need to set the base_dir of the FileLinkResolver dynamically. This PR implements the mechanisms for that.

This is done by using a link_resolver_override thats passed upto the subgraph runner which switches to using it when available.

For supporting subgraph datasource, aliases are used users can declare their subgraph datasources in the manifests normally like below example.

dataSources:
  - kind: subgraph
    name: Factory
    network: base
    source:
      address: 'QmSource'
      startBlock: 1759510

When the run gnd they have to pass in the flag

--source "QmSource:<PATH_TO_MANIFEST_OF_SOURCE_SUBGRAPH"

@incrypto32 incrypto32 changed the base branch from master to krishna/graph-dev May 12, 2025 12:12
@incrypto32 incrypto32 changed the title gnd: Support subgraph composition in dev mode gnd: Support multiple subgraphs, grafting, subgraph composition in dev mode May 12, 2025
@incrypto32 incrypto32 force-pushed the krishna/graph-dev-composition-2 branch from 0826b2a to b5bbf93 Compare May 12, 2025 14:54
@incrypto32 incrypto32 requested a review from lutter May 13, 2025 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant