From 21990804cb313c4d8f9ba770f680db4ff5d8730a Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Mon, 7 Oct 2024 15:20:50 -0700 Subject: [PATCH] common: remove paused workaround (perf) --- packages/indexer-common/src/graph-node.ts | 35 ++--------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/packages/indexer-common/src/graph-node.ts b/packages/indexer-common/src/graph-node.ts index 56922403a..f0c31014d 100644 --- a/packages/indexer-common/src/graph-node.ts +++ b/packages/indexer-common/src/graph-node.ts @@ -153,47 +153,18 @@ export class GraphNode { ): Promise { try { this.logger.debug('Fetch subgraph deployment assignments') - - // FIXME: remove this initial check for just node when graph-node releases - // https://github.com/graphprotocol/graph-node/pull/5551 - const nodeOnlyResult = await this.status + const result = await this.status .query(gql` - { + query indexingStatuses { indexingStatuses { subgraphDeployment: subgraph node + paused } } `) .toPromise() - if (nodeOnlyResult.error) { - throw nodeOnlyResult.error - } - - const withAssignments: string[] = nodeOnlyResult.data.indexingStatuses - .filter((result: QueryResult) => { - return result.node !== null && result.node !== undefined - }) - .map((result: QueryResult) => { - return result.subgraphDeployment - }) - - const result = await this.status - .query( - gql` - query indexingStatuses($subgraphs: [String!]!) { - indexingStatuses(subgraphs: $subgraphs) { - subgraphDeployment: subgraph - node - paused - } - } - `, - { subgraphs: withAssignments }, - ) - .toPromise() - if (result.error) { throw result.error }