-
Notifications
You must be signed in to change notification settings - Fork 17
chore: allow subgraph endpoint override via env var #468
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
Conversation
Adds a new environment variable that lets developers temporarily override the subgraph endpoint with a Studio endpoint during local development.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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 adds a new environment variable NEXT_PUBLIC_SUBGRAPH_ENDPOINT that allows developers to temporarily override the subgraph endpoint during local development, useful for testing with Graph Studio sandbox endpoints.
Key Changes
- Introduced
NEXT_PUBLIC_SUBGRAPH_ENDPOINTenvironment variable for overriding subgraph URLs - Updated validation logic to make
SUBGRAPH_KEYoptional when the override is provided - Applied the override to all chain configurations (mainnet, goerli, arbitrum, arbitrum-goerli)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/chains.ts | Added SUBGRAPH_URL_OVERRIDE constant and applied it as the primary subgraph URL source across all chain configurations, with updated validation |
| .env.example | Documented the new optional NEXT_PUBLIC_SUBGRAPH_ENDPOINT environment variable with usage guidance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds a new environment variable that lets developers temporarily override the subgraph endpoint with a Studio endpoint during local development.