From 7eed94692245913212a0de171e3bbf0e7b95e7f9 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 6 Nov 2024 22:32:15 -0500 Subject: [PATCH] add --statement-max-depth flag to optional parameters (#7641) --- src/pages/[platform]/reference/cli-commands/index.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/[platform]/reference/cli-commands/index.mdx b/src/pages/[platform]/reference/cli-commands/index.mdx index e0f563e9017..a4ab1ace534 100644 --- a/src/pages/[platform]/reference/cli-commands/index.mdx +++ b/src/pages/[platform]/reference/cli-commands/index.mdx @@ -236,14 +236,14 @@ npx ampx generate outputs --stack amplify-nextamplifygen2-josef-sandbox-ca85e108 ## npx ampx generate graphql-client-code -Generate GraphQL statements and types for your frontend application to consume. +Generate GraphQL statements and types for your frontend application to consume. ### Options The available parameters for `npx ampx generate graphql-client-code` are: Required parameters: -- Stack identifier +- Stack identifier - `--stack`(_string_) - A stack name that contains an Amplify backend. - Project identifier - `--app-id`(_string_) - The Amplify App ID of the project. @@ -254,6 +254,7 @@ Optional parameters: - `--format`(_string_) (choices: `modelgen`, `graphql-codegen`, `introspection`) - Specifies the format of the GraphQL client code to be generated. - `--model-target` (_string_) (choices: `java`, `swift`, `javascript`, `typescript`, `dart`) - Specifies the modelgen export target. Only applies when the --format parameter is set to modelgen. - `--statement-target`(_string_) (choices: `javascript`, `graphql`, `flow`, `typescript`, `angular`) - Specifies the graphql-codegen statement export target. Only applies when the --format parameter is set to graphql-codegen. +- `--statement-max-depth`(_integer_) - Specifies the maximum depth of the generated GraphQL statements. Only applies when the --format parameter is set to graphql-codegen. - `--type-target`(_string_) (choices: `json`, `swift`, `typescript`, `flow`, `scala`, `flow-modern`, `angular`) - Specifies the optional graphql-codegen type export target. Only applies when the --format parameter is set to graphql-codegen. - `--all`(_boolean_)- Shows hidden options. - `--profile`(_string_) - Specifies an AWS profile name. @@ -303,7 +304,7 @@ Run Amplify codegen command to generate GraphQL codegen: ```bash title="Terminal" showLineNumbers={false} npx ampx generate graphql-client-code --stack Backend --platform ts --out ./src -``` +``` #### Generate codegen in specific language and format