refactor(subgraph-client): simplify subgraph URL configuration#118
Open
silent-cipher wants to merge 3 commits into
Open
refactor(subgraph-client): simplify subgraph URL configuration#118silent-cipher wants to merge 3 commits into
silent-cipher wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors how the subgraph-client determines which subgraph endpoint to query by moving from a Goldsky project/name/version-based scheme to explicit per-network subgraph URLs. It also updates the Goldsky deploy naming scheme in the release workflow to align with the new endpoint/tag strategy.
Changes:
- Replace Goldsky project/version-derived URL construction with
VITE_SUBGRAPH_URL_MAINNET/VITE_SUBGRAPH_URL_CALIBRATION. - Memoize the
NetworkContextprovider value and stabilize the localStorage setter. - Update Goldsky deploy target naming in the release workflow and refresh
.env.example.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| subgraph-client/src/vite-env.d.ts | Updates Vite env typings for the new per-network subgraph URL variables. |
| subgraph-client/src/hooks/useLocalStorage.ts | Refactors the localStorage setter to be callback-stable (now reviewed for side-effect placement/type correctness). |
| subgraph-client/src/contexts/NetworkContext.tsx | Switches subgraph URL selection to explicit env vars and memoizes context value. |
| subgraph-client/.env.example | Documents the new env vars for configuring mainnet/calibration subgraph endpoints. |
| .github/workflows/release-please.yml | Changes Goldsky deploy target naming to pdp-explorer-<network>/<version>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr updates the subgraph endpoint scheme which was necessary to create same tag on both the subgraphs. This also simplifies subgraph url configuration in web app.