@aws-amplify/data-schema 1.21.1 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/data-schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"rxjs": "^7.8.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@changesets/cli": "^2.27.10",
|
|
61
60
|
"@rollup/plugin-typescript": "11.1.5",
|
|
62
61
|
"@tsd/typescript": "^5.1.6",
|
|
63
62
|
"@types/jest": "29.5.4",
|
package/src/SchemaProcessor.ts
CHANGED
|
@@ -1391,7 +1391,13 @@ function generateInputTypes(
|
|
|
1391
1391
|
if (refType.type === 'CustomType') {
|
|
1392
1392
|
const nestedInputTypeName = `${fieldDef.data.link}Input`;
|
|
1393
1393
|
processedFields[fieldName] = {
|
|
1394
|
-
data: {
|
|
1394
|
+
data: {
|
|
1395
|
+
type: 'ref',
|
|
1396
|
+
link: nestedInputTypeName,
|
|
1397
|
+
array: fieldDef.data.array,
|
|
1398
|
+
arrayRequired: fieldDef.data.arrayRequired,
|
|
1399
|
+
valueRequired: fieldDef.data.valueRequired
|
|
1400
|
+
},
|
|
1395
1401
|
};
|
|
1396
1402
|
|
|
1397
1403
|
// Process the nested type if it hasn't been processed and isn't a circular reference
|
|
@@ -1413,7 +1419,13 @@ function generateInputTypes(
|
|
|
1413
1419
|
}
|
|
1414
1420
|
} else if (refType.type === 'Enum') {
|
|
1415
1421
|
processedFields[fieldName] = {
|
|
1416
|
-
data: {
|
|
1422
|
+
data: {
|
|
1423
|
+
type: 'ref',
|
|
1424
|
+
link: fieldDef.data.link,
|
|
1425
|
+
array: fieldDef.data.array,
|
|
1426
|
+
arrayRequired: fieldDef.data.arrayRequired,
|
|
1427
|
+
valueRequired: fieldDef.data.valueRequired
|
|
1428
|
+
},
|
|
1417
1429
|
};
|
|
1418
1430
|
} else {
|
|
1419
1431
|
throw new Error(
|
|
@@ -1425,7 +1437,10 @@ function generateInputTypes(
|
|
|
1425
1437
|
// Handle inline custom types
|
|
1426
1438
|
const nestedInputTypeName = `${capitalize(originalTypeName)}${capitalize(fieldName)}Input`;
|
|
1427
1439
|
processedFields[fieldName] = {
|
|
1428
|
-
data: {
|
|
1440
|
+
data: {
|
|
1441
|
+
type: 'ref',
|
|
1442
|
+
link: nestedInputTypeName
|
|
1443
|
+
},
|
|
1429
1444
|
};
|
|
1430
1445
|
|
|
1431
1446
|
if (!processedTypes.has(nestedInputTypeName)) {
|