Skip to content

Commit

Permalink
add --statement-max-depth flag to optional parameters (#7641)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbonifacio authored Nov 7, 2024
1 parent 0e7d09e commit 7eed946
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/[platform]/reference/cli-commands/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7eed946

Please sign in to comment.