feat: allow subgraph indexing errors - #176
Conversation
|
Deployment failed for project pdp-explorer with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
There was a problem hiding this comment.
🟡 Changes recommended
There are blocking correctness/robustness issues in the new fetcher guard (TypeScript safety) and the banner logic now hides indexing errors unless the indexer is also delayed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the subgraph client to tolerate Graph Node indexing errors by (1) requesting partial data via subgraphError: allow on many queries and (2) treating indexing_error responses as non-fatal when the server still returns usable data. It also tweaks the UI banner logic around when indexing-error warnings are shown.
Changes:
- Adds
subgraphError: allowto many entity/root-field queries so Graph Node can return partial data even when indexing errors exist. - Updates the GraphQL fetcher to return
datafor 2xx responses that only containindexing_errorGraphQL errors. - Adjusts the IndexerLagBanner messaging/conditions around indexing errors vs. lag.
File summaries
| File | Description |
|---|---|
| subgraph-client/src/utility/queries.ts | Adds subgraphError: allow to multiple queries to permit partial results under indexing errors. |
| subgraph-client/src/utility/fetcher.ts | Swallows indexing_error-only GraphQL errors when the response includes usable data. |
| subgraph-client/src/components/shared/IndexerLagBanner.tsx | Changes when the indexing-error banner is shown and expands the banner message. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ref: https://filecoinproject.slack.com/archives/C096DTH73T6/p1787808533173589?thread_ts=1787549150.920219&cid=C096DTH73T6