Skip to content

Commit fefa780

Browse files
authored
Merge pull request #592 from aws-amplify/main
Release Amplify Codegen at major version 4
2 parents 1db85ce + 3885b96 commit fefa780

File tree

13 files changed

+483
-314
lines changed

13 files changed

+483
-314
lines changed

packages/amplify-codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "amplify-codegen",
3-
"version": "3.4.4",
3+
"version": "4.0.0",
44
"description": "amplify code generator",
55
"repository": {
66
"type": "git",

packages/amplify-codegen/src/commands/statements.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ async function generateStatements(context, forceDownloadSchema, maxDepth, withou
6363
const generatedOps = generateGraphQLDocuments(schemaData, {
6464
maxDepth: maxDepth || cfg.amplifyExtension.maxDepth,
6565
useExternalFragmentForS3Object: (language === 'graphql'),
66+
// default typenameIntrospection to true when not set
67+
typenameIntrospection:
68+
cfg.amplifyExtension.typenameIntrospection === undefined ? true : !!cfg.amplifyExtension.typenameIntrospection,
6669
});
6770
if(!generatedOps) {
6871
context.print.warning('No GraphQL statements are generated. Check if the introspection schema has GraphQL operations defined.');

packages/amplify-codegen/tests/commands/statements.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('command - statements', () => {
9797
path.join(MOCK_PROJECT_ROOT, MOCK_SCHEMA),
9898
MOCK_APIS[0],
9999
MOCK_REGION,
100-
forceDownload
100+
forceDownload,
101101
);
102102
});
103103

@@ -110,7 +110,7 @@ describe('command - statements', () => {
110110
path.join(MOCK_PROJECT_ROOT, MOCK_SCHEMA),
111111
MOCK_APIS[0],
112112
MOCK_REGION,
113-
forceDownload
113+
forceDownload,
114114
);
115115
});
116116

0 commit comments

Comments
 (0)