You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The available parameters for `npx amplify generate graphql-client-code` are:
223
+
224
+
Required parameters:
225
+
- Stack identifier
226
+
-`--stack`(_string_) - A stack name that contains an Amplify backend.
227
+
- Project identifier
228
+
-`--app-id`(_string_) - The Amplify App ID of the project.
229
+
-`--branch`(_string_) - A git branch of the Amplify project.
230
+
231
+
Optional parameters:
232
+
-`--out`(_string_) - Specifies the path to the directory where the config is written. If not provided, defaults to the current process working directory.
233
+
-`--format`(_string_) (choices: `modelgen`, `graphql-codegen`, `introspection`) - Specifies the format of the GraphQL client code to be generated.
234
+
-`--model-target` (_string_) (choices: `java`, `swift`, `javascript`, `typescript`, `dart`) - Specifies the modelgen export target. Only applies when the --format parameter is set to modelgen.
235
+
-`--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.
236
+
-`--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.
237
+
-`--all`(_boolean_)- Shows hidden options.
238
+
-`--profile`(_string_) - Specifies an AWS profile name.
239
+
-`--debug` (_boolean_) - Print debug logs to the console.
240
+
-`--help`(_boolean_) - Displays help information about the command.
### Generate GraphQL client code for a branch that is connected in the Amplify service
249
+
Sometimes you want to test your latest local changes with the backend of another deployed branch. If you want to generate the GraphQL client code file(s) for the latest deployment of another branch, then you can run the following command:
### Generate codegen for CDK app using a joint "AmplifyBackendStack" construct
255
+
Assume you have deployed your Amplify project with the CDK construct. You will need to remember your app's project name (designated as the second parameter in your CDK construct) and stack name (designated as part of your `npx cdk deploy` context)
0 commit comments