Skip to content

Commit

Permalink
common: Fix handling of indexingStatus responses from graph-node
Browse files Browse the repository at this point in the history
The `paused` field is optional.
  • Loading branch information
fordN committed Jul 16, 2024
1 parent dea155c commit 1c80f91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/indexer-common/src/graph-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ export class GraphNode {
return result.data.indexingStatuses
.filter((status: QueryResult) => {
if (subgraphStatus === SubgraphStatus.ACTIVE) {
return status.paused === false || (status.paused === undefined && status.node === 'removed')
return (
status.paused === false ||
(status.paused === undefined && status.node === 'removed')
)
} else if (subgraphStatus === SubgraphStatus.PAUSED) {
return status.node === 'removed' || status.paused === true
} else if (subgraphStatus === SubgraphStatus.ALL) {
Expand Down

0 comments on commit 1c80f91

Please sign in to comment.