Conversation
There was a problem hiding this comment.
Pull request overview
Updates GraphQL endpoint configuration for supported networks and adjusts GraphQL codegen defaults/tooling configuration.
Changes:
- Update Mainnet subgraph endpoints to use new primary + replica URLs.
- Point Hoodi subgraph endpoint (and
.graphqlconfig) tographs-replicaand switch deployment fromprodtostage. - Change GraphQL codegen default network from Mainnet to Hoodi.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/helpers/configs/mainnet.ts |
Updates Mainnet subgraph URLs (primary + replica). |
src/helpers/configs/hoodi.ts |
Changes Hoodi subgraph URL host and deployment (prod → stage). |
codegen.ts |
Switches codegen default network selection to Hoodi. |
.graphqlconfig |
Updates the configured Subgraph endpoint to Hoodi stage on replica host. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
|
|
||
| let network: Network = Network.Mainnet | ||
| let network: Network = Network.Hoodi |
There was a problem hiding this comment.
Changing the default network to Network.Hoodi will affect CI and local builds: the GitHub workflows run pnpm prepare (which runs graphql-codegen) without setting NETWORK, so schema/type generation will now target Hoodi by default. Consider keeping the default as Mainnet (or selecting from process.env.NETWORK with a safe default), and add an explicit hoodi branch if you want to support NETWORK=hoodi.
| api: { | ||
| backend: 'https://hoodi-api.stakewise.io/graphql', | ||
| subgraph: 'https://graphs.stakewise.io/hoodi/subgraphs/name/stakewise/prod', | ||
| subgraph: 'https://graphs-replica.stakewise.io/hoodi/subgraphs/name/stakewise/stage', |
There was a problem hiding this comment.
The Hoodi subgraph URL switches from the .../stakewise/prod deployment to .../stakewise/stage. This is inconsistent with the other network configs (which target prod) and may point the SDK at a staging subgraph unintentionally. If the intention is only to use the replica host, consider keeping the /prod subgraph name; if stage is intended, it would be good to align naming/docs and ensure the backend/subgraph environments match.
| subgraph: 'https://graphs-replica.stakewise.io/hoodi/subgraphs/name/stakewise/stage', | |
| subgraph: 'https://graphs-replica.stakewise.io/hoodi/subgraphs/name/stakewise/prod', |
| "endpoints": { | ||
| "Subgraph GraphQL": { | ||
| "url": "https://graphs.stakewise.io/hoodi/subgraphs/name/stakewise/prod", | ||
| "url": "https://graphs-replica.stakewise.io/hoodi/subgraphs/name/stakewise/stage", |
There was a problem hiding this comment.
This endpoint is now hardcoded to the Hoodi stage subgraph. Since the repo supports multiple networks and codegen.ts selects a network at generation time, consider whether .graphqlconfig should remain pinned to a single network/environment, or be updated to default to the primary (prod) endpoint to avoid local tooling targeting a different schema than the build uses.
| "url": "https://graphs-replica.stakewise.io/hoodi/subgraphs/name/stakewise/stage", | |
| "url": "${env:SUBGRAPH_GRAPHQL_URL}", |
| 'https://graphs.stakewise.io/mainnet/subgraphs/name/stakewise/prod', | ||
| 'https://graphs-replica.stakewise.io/mainnet/subgraphs/name/stakewise/prod', |
There was a problem hiding this comment.
The PR title "Home page" doesn't appear to match the actual changes here (GraphQL endpoint/config updates and codegen network default). If this PR is meant to be about homepage functionality, the title/description likely needs updating; otherwise, consider renaming the PR to reflect the configuration/codegen change to make review and release notes accurate.
No description provided.