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 a5c0f4d commit 786a101
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 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
25 changes: 12 additions & 13 deletions packages/indexer-cli/src/cost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ export const displayCostModels = (
outputFormat === OutputFormat.Json
? JSON.stringify(costModels, null, 2)
: outputFormat === OutputFormat.Yaml
? yaml.stringify(costModels).trim()
: costModels.length === 0
? 'No data'
: table(
[Object.keys(costModels[0]), ...costModels.map(cost => Object.values(cost))],
{
border: getBorderCharacters('norc'),
},
).trim()
? yaml.stringify(costModels).trim()
: costModels.length === 0
? 'No data'
: table(
[Object.keys(costModels[0]), ...costModels.map(cost => Object.values(cost))],
{
border: getBorderCharacters('norc'),
},
).trim()

export const displayCostModel = (
outputFormat: OutputFormat,
Expand All @@ -158,8 +158,8 @@ export const displayCostModel = (
outputFormat === OutputFormat.Json
? JSON.stringify(cost, null, 2)
: outputFormat === OutputFormat.Yaml
? yaml.stringify(cost).trim()
: table([Object.keys(cost), Object.values(cost)], {
? yaml.stringify(cost).trim()
: table([Object.keys(cost), Object.values(cost)], {
border: getBorderCharacters('norc'),
}).trim()

Expand Down 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

0 comments on commit 786a101

Please sign in to comment.