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
Copy file name to clipboardExpand all lines: src/pages/gen2/reference/cli-commands/index.mdx
+13-24Lines changed: 13 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -224,23 +224,20 @@ The available parameters for `npx amplify generate graphql-client-code` are:
224
224
Required parameters:
225
225
- Stack identifier
226
226
-`--stack`: A stack name that contains an Amplify backend.
227
-
- XOR
228
227
- Project identifier
229
228
-`--app-id`(String) - The Amplify App ID of the project.
230
229
-`--branch`(String) - A git branch of the Amplify project.
231
230
232
231
Optional parameters:
233
-
-`--debug` (boolean) - Print debug logs to the console.
234
-
-`--debug`(boolean) - Enables printing debug logs to the console.
235
-
-`--help`(boolean) - Displays help information about the command.
236
-
-`--profile`(string) - Specifies an AWS profile name.
237
232
-`--out`(string) - Specifies the path to the directory where the config is written. If not provided, defaults to the current process working directory.
238
233
-`--format`(string (choices: "modelgen", "graphql-codegen", "introspection")) - Specifies the format of the GraphQL client code to be generated.
239
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.
240
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.
241
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.
242
237
-`--all`(boolean)- Shows hidden options.
243
-
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.
How to find the right format for your GraphQL client code:
288
-
289
-
- What platform are you building your app for?
290
-
- TypeScript
291
-
- Do you have conflict resolution enabled on your API?
292
-
- No: "Introspection schema".
293
-
- If you need backwards-compatibility with Amplify (Classic) codebases, then you can generate "GraphQL codegen" in addition to the introspection schema.
294
-
- Yes: "Modelgen". Only use with DataStore.
295
-
- Android
296
-
- Which library are you using?
297
-
- AWS Amplify: "Modelgen"
298
-
- AWS Mobile SDK: "GraphQL codegen"
299
-
- Swift
300
-
- Which library are you using?
301
-
- AWS Amplify: "Modelgen"
302
-
- AWS Mobile SDK: "GraphQL codegen"
303
284
304
-
{/* @TODO */}
285
+
| Format | Platform | Codegen command in Amplify CLI | Command in Amplify Gen2 | Default generated file/path |
0 commit comments