Skip to content

Commit defbd8f

Browse files
authored
ModelGen(Swift, Java): Handle nullability of lists transparently based on the GraphQL schema specification (#142)
* fix(modelgen): Handle nullability of lists properly
1 parent b81a221 commit defbd8f

File tree

11 files changed

+744
-99
lines changed

11 files changed

+744
-99
lines changed

.eslintrc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,7 @@ module.exports = {
230230
'function-template-dir',
231231

232232
// Ignore output directories of typescript project until move to tsc and fixing src locations
233-
'/packages/appsync-modelgen-plugin/lib',
234-
'/packages/graphql-docs-generator/lib',
235-
'/packages/graphql-types-generator/lib',
236-
'/packages/amplify-codegen-e2e-core/lib',
237-
'/packages/amplify-codegen-e2e-tests/lib',
233+
'/packages/*/lib',
238234

239235
// Ignore CHANGELOG.md files
240236
'/packages/*/CHANGELOG.md'

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ async function generateModels(context) {
8989
);
9090
}
9191
}
92+
const handleListNullabilityTransparently = readFeatureFlag('codegen.handleListNullabilityTransparently');
93+
9294
const appsyncLocalConfig = await appSyncDataStoreCodeGen.preset.buildGeneratesSection({
9395
baseOutputDir: outputPath,
9496
schema,
@@ -99,6 +101,7 @@ async function generateModels(context) {
99101
emitAuthProvider,
100102
generateIndexRules,
101103
enableDartNullSafety,
104+
handleListNullabilityTransparently
102105
},
103106
});
104107

0 commit comments

Comments
 (0)