Skip to content

Commit 1c7d534

Browse files
committed
agent,common: fix status endpoint
1 parent e5f332d commit 1c7d534

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

packages/indexer-agent/src/commands/start.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ export async function run(
548548
queryInterface: sequelize.getQueryInterface(),
549549
logger,
550550
graphNodeAdminEndpoint: argv.graphNodeAdminEndpoint,
551-
networkSpecifications: networkSpecification,
551+
networkSpecifications: [networkSpecification],
552552
graphNode: graphNode,
553553
},
554554
storage: new SequelizeStorage({ sequelize }),

packages/indexer-common/src/indexer-management/client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface IndexerManagementResolverContext {
2222
logger: Logger
2323
defaults: IndexerManagementDefaults
2424
actionManager: ActionManager | undefined
25-
network: Network | undefined
25+
network: Network
2626
}
2727

2828
const SCHEMA_SDL = gql`
@@ -452,7 +452,7 @@ export interface IndexerManagementClientOptions {
452452
logger: Logger
453453
models: IndexerManagementModels
454454
graphNode: GraphNode
455-
network: Network | undefined
455+
network: Network
456456
defaults: IndexerManagementDefaults
457457
}
458458

packages/indexer-common/src/indexer-management/resolvers/indexer-status.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ const URL_VALIDATION_TEST: Test = {
6060
}
6161

6262
export default {
63-
indexerRegistration: async ({
64-
network,
65-
}: IndexerManagementResolverContext): Promise<object | null> => {
63+
indexerRegistration: async (
64+
_: { protocolNetwork: string | null },
65+
{ network }: IndexerManagementResolverContext,
66+
): Promise<object | null> => {
6667
if (!network) {
6768
throw Error(
6869
'IndexerManagementClient must be in `network` mode to fetch indexer registration information',
@@ -97,7 +98,7 @@ export default {
9798
},
9899

99100
indexerDeployments: async (
100-
_: {},
101+
_: { protocolNetwork: string | null },
101102
{ graphNode }: IndexerManagementResolverContext,
102103
): Promise<object | null> => {
103104
const result = await graphNode.indexingStatus([])
@@ -107,10 +108,10 @@ export default {
107108
}))
108109
},
109110

110-
indexerAllocations: async ({
111-
network,
112-
logger,
113-
}: IndexerManagementResolverContext): Promise<object | null> => {
111+
indexerAllocations: async (
112+
_: { protocolNetwork: string | null },
113+
{ network, logger }: IndexerManagementResolverContext,
114+
): Promise<object | null> => {
114115
if (!network) {
115116
throw Error(
116117
'IndexerManagementClient must be in `network` mode to fetch indexer allocations',

0 commit comments

Comments
 (0)