diff --git a/cli/src/commands/federated-graph/commands/list.ts b/cli/src/commands/federated-graph/commands/list.ts index 5d0fe3e172..7b146646c1 100644 --- a/cli/src/commands/federated-graph/commands/list.ts +++ b/cli/src/commands/federated-graph/commands/list.ts @@ -65,7 +65,7 @@ export default (opts: BaseCommandOptions) => { } if (options.raw) { - console.log(resp.graphs); + console.log(JSON.stringify(resp.graphs)); process.exit(0); } diff --git a/cli/src/commands/namespace/commands/list.ts b/cli/src/commands/namespace/commands/list.ts index a7c152739d..335911a7a3 100644 --- a/cli/src/commands/namespace/commands/list.ts +++ b/cli/src/commands/namespace/commands/list.ts @@ -41,7 +41,7 @@ export default (opts: BaseCommandOptions) => { } if (options.raw) { - console.log(resp.namespaces); + console.log(JSON.stringify(resp.namespaces)); return; } diff --git a/cli/src/commands/subgraph/commands/list.ts b/cli/src/commands/subgraph/commands/list.ts index f87a29aff3..9af2ccd0c6 100644 --- a/cli/src/commands/subgraph/commands/list.ts +++ b/cli/src/commands/subgraph/commands/list.ts @@ -60,7 +60,7 @@ export default (opts: BaseCommandOptions) => { } if (options.raw) { - console.log(resp.graphs); + console.log(JSON.stringify(resp.graphs)); process.exit(0); }