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

*: Add support for local querying of Epoch and TAP subgraphs #1063

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fordN
Copy link
Contributor

@fordN fordN commented Dec 13, 2024

Changes

  • Merge EpochSubgraph, NetworkSubgraph, and TAPSubgraph class implementations into a single, more generalized class: SubgraphClient. By doing so support for local deployment querying is added for Epoch and TAP subgraphs.
  • Update startup of agent to ensure Epoch and TAP subgraphs are syncing locally (along with network subgraph).
  • Update docs to include deployment id startup options for Epoch and TAP subgraphs.

Background

The goal here is to add support for querying local deployments of the Epoch and TAP subgraphs. Instead of updating the EpochSubgraph and TAPSubgraph classes to that effect I merged those in with the NetworkSubgraph class which already has local querying support and auto switching between local and external based on health of endpoints.

- For user, this change effectively adds support for local querying on
epoch and tap subgraphs (previously only supported on network subgraph).
- For contributors, this simplifies the codebase to have 1
SubgraphClient class instead of 3 separate implementations:
EpochSubgraph, NetworkSubgraph and TapSubgraph.
@fordN fordN requested review from dwerner, carlosvdr and gusinacio and removed request for dwerner December 13, 2024 20:48
@fordN fordN changed the title *: Merge subgraph client implementations *: Add support for local querying of Epoch and TAP subgraphs Dec 13, 2024
Copy link
Contributor

@dwerner dwerner left a comment

Choose a reason for hiding this comment

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

👍

@fordN fordN force-pushed the ford/merge-subgraph-clients branch from e9f0894 to 9e514a9 Compare December 13, 2024 20:59
@carlosvdr
Copy link
Contributor

Looks pretty good, I love the idea of having one more generalized class.
My only question is, if you were able to test this, either on a testnet or somewhere to make sure it isn't breaking anything?

Copy link
Member

@gusinacio gusinacio left a comment

Choose a reason for hiding this comment

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

Great addition, we really needed this feature of indexing tap subgraph.

@fordN
Copy link
Contributor Author

fordN commented Dec 16, 2024

@carlosvdr still need to test on a running indexer! I won't merge this until I do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

4 participants