Skip to content

refactor(subgraph-client): simplify subgraph URL configuration#118

Open
silent-cipher wants to merge 3 commits into
mainfrom
fix/subgraph-endpoint-scheme
Open

refactor(subgraph-client): simplify subgraph URL configuration#118
silent-cipher wants to merge 3 commits into
mainfrom
fix/subgraph-endpoint-scheme

Conversation

@silent-cipher

Copy link
Copy Markdown
Collaborator

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.

Copilot AI review requested due to automatic review settings July 1, 2026 16:01
@FilOzzy FilOzzy added this to FOC Jul 1, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 NetworkContext provider 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.

Comment thread subgraph-client/src/hooks/useLocalStorage.ts Outdated
Comment thread subgraph-client/.env.example
@silent-cipher silent-cipher requested a review from rjan90 July 1, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📌 Triage

Development

Successfully merging this pull request may close these issues.

3 participants