Skip to content

Commit

Permalink
common, cli: fix urql query params
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerner committed Oct 8, 2024
1 parent 8d3e7c4 commit 07dfb21
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
3 changes: 1 addition & 2 deletions packages/indexer-cli/src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ export async function executeApprovedActions(
}
}
`,
[],
[],
undefined,
)
.toPromise()

Expand Down
3 changes: 1 addition & 2 deletions packages/indexer-cli/src/cost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ export const costModels = async (
}
}
`,
[],
[],
undefined,
)
.toPromise()

Expand Down
8 changes: 3 additions & 5 deletions packages/indexer-common/src/graph-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,15 @@ export class GraphNode {
const result = await this.status
.query(
gql`
query indexingStatuses {
{
indexingStatuses {
subgraphDeployment: subgraph
node
paused
}
}
`,
[],
[],
undefined,
)
.toPromise()

Expand Down Expand Up @@ -226,8 +225,7 @@ export class GraphNode {
}
}
`,
[],
[],
undefined,
)
.toPromise()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ describe('Cost models', () => {
}

await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', inputs)
})

Expand Down Expand Up @@ -478,7 +478,7 @@ describe('Cost models', () => {
await client.mutation(SET_COST_MODEL_MUTATION, { costModel: input }).toPromise()

await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [expected])
})

Expand Down Expand Up @@ -596,7 +596,7 @@ describe('Feature: Inject $DAI variable', () => {
await client.mutation(SET_COST_MODEL_MUTATION, { costModel: update }).toPromise()

await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [initial])
})

Expand All @@ -614,7 +614,7 @@ describe('Feature: Inject $DAI variable', () => {
}
await client.mutation(SET_COST_MODEL_MUTATION, { costModel: update }).toPromise()
await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [update])
})

Expand All @@ -639,7 +639,7 @@ describe('Feature: Inject $DAI variable', () => {
await client.setDai('15.3')

await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [
{
...inputs[0],
Expand Down Expand Up @@ -677,7 +677,7 @@ describe('Feature: Inject $DAI variable', () => {
}

await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [
{
...inputs[0],
Expand Down Expand Up @@ -707,7 +707,7 @@ describe('Feature: Inject $DAI variable', () => {
}
await client.mutation(SET_COST_MODEL_MUTATION, { costModel: update }).toPromise()
await expect(
client.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
client.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [
{
...update,
Expand Down Expand Up @@ -742,7 +742,7 @@ describe('Feature: Inject $DAI variable', () => {
.mutation(SET_COST_MODEL_MUTATION, { costModel: update })
.toPromise()
await expect(
clientNoInjectDai.query(GET_COST_MODELS_QUERY, [], []).toPromise(),
clientNoInjectDai.query(GET_COST_MODELS_QUERY, undefined).toPromise(),
).resolves.toHaveProperty('data.costModels', [update])
})
})
Expand Down

0 comments on commit 07dfb21

Please sign in to comment.