@aws-amplify/graphql-api-construct 1.5.2 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- package/.jsii +15 -15
- package/CHANGELOG.md +10 -0
- package/lib/amplify-dynamodb-table-wrapper.js +1 -1
- package/lib/amplify-graphql-api.js +1 -1
- package/lib/amplify-graphql-definition.js +1 -1
- package/lib/sql-model-datasource-strategy.js +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/API.md +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/CHANGELOG.md +10 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js +6 -4
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/graphql-auth-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts +1 -0
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/definitions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js +4 -2
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/index.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.d.ts +3 -3
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js +20 -3
- package/node_modules/@aws-amplify/graphql-auth-transformer/lib/utils/validations.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-auth-transformer/package.json +12 -9
- package/node_modules/@aws-amplify/graphql-default-value-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-default-value-transformer/package.json +7 -6
- package/node_modules/@aws-amplify/graphql-function-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-function-transformer/package.json +6 -5
- package/node_modules/@aws-amplify/graphql-http-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-http-transformer/package.json +6 -5
- package/node_modules/@aws-amplify/graphql-index-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-index-transformer/package.json +7 -6
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/lib/assets/mapping-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-maps-to-transformer/package.json +10 -9
- package/node_modules/@aws-amplify/graphql-model-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-notification-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/lib/rds-patching-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-model-transformer/package.json +6 -5
- package/node_modules/@aws-amplify/graphql-predictions-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip +0 -0
- package/node_modules/@aws-amplify/graphql-predictions-transformer/package.json +6 -5
- package/node_modules/@aws-amplify/graphql-relational-transformer/CHANGELOG.md +10 -0
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.d.ts.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js +11 -3
- package/node_modules/@aws-amplify/graphql-relational-transformer/lib/graphql-many-to-many-transformer.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-relational-transformer/package.json +8 -7
- package/node_modules/@aws-amplify/graphql-searchable-transformer/CHANGELOG.md +6 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/definitions.js +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/definitions.js.map +1 -1
- package/node_modules/@aws-amplify/graphql-searchable-transformer/lib/streaming-lambda.zip +0 -0
- package/node_modules/@aws-amplify/graphql-searchable-transformer/package.json +7 -6
- package/node_modules/@aws-amplify/graphql-sql-transformer/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-sql-transformer/package.json +7 -6
- package/node_modules/@aws-amplify/graphql-transformer/CHANGELOG.md +8 -0
- package/node_modules/@aws-amplify/graphql-transformer/package.json +16 -15
- package/node_modules/@aws-amplify/graphql-transformer-core/CHANGELOG.md +4 -0
- package/node_modules/@aws-amplify/graphql-transformer-core/package.json +4 -3
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/package.json +1 -2
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/tsconfig.tsbuildinfo +1 -1
- package/node_modules/graphql-mapping-template/package.json +1 -2
- package/node_modules/graphql-transformer-common/package.json +1 -2
- package/package.json +18 -17
- package/node_modules/@aws-amplify/graphql-transformer-interfaces/LICENSE +0 -201
- package/node_modules/graphql-mapping-template/LICENSE +0 -201
- package/node_modules/graphql-transformer-common/LICENSE +0 -201
@@ -50,19 +50,34 @@ found '${rule.provider}' assigned.`);
|
|
50
50
|
}
|
51
51
|
};
|
52
52
|
exports.validateRuleAuthStrategy = validateRuleAuthStrategy;
|
53
|
-
const validateRules = (rules, configuredAuthProviders, typeName) => {
|
53
|
+
const validateRules = (rules, configuredAuthProviders, typeName, dataSourceStrategies) => {
|
54
54
|
if (rules.length === 0) {
|
55
55
|
throw new graphql_transformer_core_1.InvalidDirectiveError(`@auth on ${typeName} does not have any auth rules.`);
|
56
56
|
}
|
57
57
|
for (const rule of rules) {
|
58
58
|
(0, exports.validateRuleAuthStrategy)(rule, configuredAuthProviders);
|
59
59
|
(0, exports.commonRuleValidation)(rule);
|
60
|
+
validateRuleOperations(rule, dataSourceStrategies, typeName);
|
60
61
|
}
|
61
62
|
};
|
62
63
|
exports.validateRules = validateRules;
|
63
|
-
const
|
64
|
+
const validateRuleOperations = (rule, dataSourceStrategies, typeName, fieldName) => {
|
65
|
+
if (!(0, graphql_transformer_core_1.isModelType)(dataSourceStrategies, typeName) || !(0, graphql_transformer_core_1.isSqlModel)(dataSourceStrategies, typeName)) {
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
if (!rule.operations || rule.operations.length === 0) {
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
if (rule.operations.includes('sync')) {
|
72
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@auth on ${typeName}${fieldName ? `.${fieldName}` : ''} cannot specify 'sync' operation as it is not supported for SQL data sources`);
|
73
|
+
}
|
74
|
+
if (rule.operations.includes('search')) {
|
75
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@auth on ${typeName}${fieldName ? `.${fieldName}` : ''} cannot specify 'search' operation as it is not supported for SQL data sources`);
|
76
|
+
}
|
77
|
+
};
|
78
|
+
const validateFieldRules = (authDir, isParentTypeBuiltinType, parentHasModelDirective, fieldName, transformParameters, parent, dataSourceStrategies) => {
|
64
79
|
const rules = authDir.getArguments({ rules: [] }, (0, graphql_transformer_core_1.generateGetArgumentsInput)(transformParameters)).rules;
|
65
|
-
if (!isParentTypeBuiltinType && parentHasModelDirective && (0, graphql_transformer_core_1.isSqlModel)(
|
80
|
+
if (!isParentTypeBuiltinType && parentHasModelDirective && (0, graphql_transformer_core_1.isSqlModel)(dataSourceStrategies, parent.name.value)) {
|
66
81
|
throw new graphql_transformer_core_1.InvalidDirectiveError(`@auth rules are not supported on fields on relational database models. Check field "${fieldName}" on type "${parent.name.value}". Please use @auth on the type instead.`);
|
67
82
|
}
|
68
83
|
if (rules.length === 0) {
|
@@ -77,6 +92,8 @@ are already on an operation already.`);
|
|
77
92
|
throw new graphql_transformer_core_1.InvalidDirectiveError(`@auth rules on fields within types that does not have @model directive cannot specify 'operations' argument as there are \
|
78
93
|
operations will be generated by the CLI.`);
|
79
94
|
}
|
95
|
+
const typeName = parent.name.value;
|
96
|
+
validateRuleOperations(rule, dataSourceStrategies, typeName, fieldName);
|
80
97
|
}
|
81
98
|
};
|
82
99
|
exports.validateFieldRules = validateFieldRules;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validations.js","sourceRoot":"","sources":["../../src/utils/validations.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"validations.js","sourceRoot":"","sources":["../../src/utils/validations.ts"],"names":[],"mappings":";;;AAAA,oFAM+C;AASxC,MAAM,wBAAwB,GAAG,CAAC,IAAc,EAAE,uBAAgD,EAAE,EAAE;IAI3G,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,IAAI,IAAI,CAAC,QAAQ,KAAK,MAAM,EAAE;QACxF,MAAM,IAAI,gDAAqB,CAC7B,qGAAqG,IAAI,CAAC,QAAQ,aAAa,CAChI,CAAC;KACH;IACD,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QAChE,MAAM,IAAI,gDAAqB,CAAC,mFAAmF,CAAC,CAAC;KACtH;IAKD,IAAI,IAAI,CAAC,KAAK,KAAK,OAAO,EAAE;QAC1B,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,IAAI,IAAI,CAAC,QAAQ,KAAK,MAAM,EAAE;YAC9E,MAAM,IAAI,gDAAqB,CAC7B;SACC,IAAI,CAAC,QAAQ,aAAa,CAC5B,CAAC;SACH;KACF;IAKD,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;QAC3B,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC1E,MAAM,IAAI,gDAAqB,CAC7B;SACC,IAAI,CAAC,QAAQ,aAAa,CAC5B,CAAC;SACH;KACF;IAKD,IAAI,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,QAAA,kBAAkB,sBAsC7B;AAGK,MAAM,oBAAoB,GAAG,CAAC,IAAc,EAAE,EAAE;IACrD,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IACvE,IAAI,KAAK,KAAK,QAAQ,IAAI,aAAa,EAAE;QACvC,MAAM,IAAI,gDAAqB,CAAC;kEAC8B,CAAC,CAAC;KACjE;IACD,IAAI,KAAK,KAAK,OAAO,IAAI,UAAU,EAAE;QACnC,MAAM,IAAI,gDAAqB,CAAC;4DACwB,CAAC,CAAC;KAC3D;IACD,IAAI,WAAW,IAAI,MAAM,EAAE;QACzB,MAAM,IAAI,gDAAqB,CAAC,mEAAmE,CAAC,CAAC;KACtG;IACD,IAAI,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrD,MAAM,IAAI,gDAAqB,CAAC,oDAAoD,CAAC,CAAC;KACvF;AACH,CAAC,CAAC;AAhBW,QAAA,oBAAoB,wBAgB/B"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-auth-transformer",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.4",
|
4
4
|
"description": "Amplify GraphQL @auth transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -29,9 +29,9 @@
|
|
29
29
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@aws-amplify/graphql-model-transformer": "2.4.
|
33
|
-
"@aws-amplify/graphql-relational-transformer": "2.3.
|
34
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
32
|
+
"@aws-amplify/graphql-model-transformer": "2.4.3",
|
33
|
+
"@aws-amplify/graphql-relational-transformer": "2.3.4",
|
34
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
35
35
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
36
36
|
"graphql": "^15.5.0",
|
37
37
|
"graphql-mapping-template": "4.20.14",
|
@@ -40,9 +40,11 @@
|
|
40
40
|
"md5": "^2.3.0"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
|
-
"@aws-amplify/graphql-
|
44
|
-
"@aws-amplify/graphql-
|
45
|
-
"@aws-amplify/graphql-transformer
|
43
|
+
"@aws-amplify/graphql-function-transformer": "2.1.15",
|
44
|
+
"@aws-amplify/graphql-index-transformer": "2.3.3",
|
45
|
+
"@aws-amplify/graphql-searchable-transformer": "2.5.0",
|
46
|
+
"@aws-amplify/graphql-sql-transformer": "0.2.3",
|
47
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3",
|
46
48
|
"@types/node": "^12.12.6"
|
47
49
|
},
|
48
50
|
"peerDependencies": {
|
@@ -75,7 +77,8 @@
|
|
75
77
|
"coverageReporters": [
|
76
78
|
"clover",
|
77
79
|
"text"
|
78
|
-
]
|
80
|
+
],
|
81
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
79
82
|
},
|
80
|
-
"gitHead": "
|
83
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
81
84
|
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.2.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-default-value-transformer@2.2.2...@aws-amplify/graphql-default-value-transformer@2.2.3) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-default-value-transformer
|
9
|
+
|
6
10
|
## [2.2.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-default-value-transformer@2.2.1...@aws-amplify/graphql-default-value-transformer@2.2.2) (2023-12-18)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @aws-amplify/graphql-default-value-transformer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-default-value-transformer",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.3",
|
4
4
|
"description": "Amplify GraphQL default value transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
32
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
33
33
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
34
34
|
"graphql": "^15.5.0",
|
35
35
|
"graphql-mapping-template": "4.20.14",
|
@@ -37,8 +37,8 @@
|
|
37
37
|
"libphonenumber-js": "1.9.47"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@aws-amplify/graphql-model-transformer": "2.4.
|
41
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
40
|
+
"@aws-amplify/graphql-model-transformer": "2.4.3",
|
41
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3"
|
42
42
|
},
|
43
43
|
"jest": {
|
44
44
|
"transform": {
|
@@ -66,7 +66,8 @@
|
|
66
66
|
"coverageReporters": [
|
67
67
|
"clover",
|
68
68
|
"text"
|
69
|
-
]
|
69
|
+
],
|
70
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
70
71
|
},
|
71
|
-
"gitHead": "
|
72
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
72
73
|
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.1.15](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-function-transformer@2.1.14...@aws-amplify/graphql-function-transformer@2.1.15) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-function-transformer
|
9
|
+
|
6
10
|
## [2.1.14](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-function-transformer@2.1.13...@aws-amplify/graphql-function-transformer@2.1.14) (2023-12-18)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @aws-amplify/graphql-function-transformer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-function-transformer",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.15",
|
4
4
|
"description": "Amplify GraphQL @function transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -28,14 +28,14 @@
|
|
28
28
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
31
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
32
32
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
33
33
|
"graphql": "^15.5.0",
|
34
34
|
"graphql-mapping-template": "4.20.14",
|
35
35
|
"graphql-transformer-common": "4.27.1"
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
38
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
38
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
41
|
"aws-cdk-lib": "^2.80.0",
|
@@ -69,7 +69,8 @@
|
|
69
69
|
],
|
70
70
|
"modulePathIgnorePatterns": [
|
71
71
|
"overrides"
|
72
|
-
]
|
72
|
+
],
|
73
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
73
74
|
},
|
74
|
-
"gitHead": "
|
75
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
75
76
|
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.1.15](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@2.1.14...@aws-amplify/graphql-http-transformer@2.1.15) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-http-transformer
|
9
|
+
|
6
10
|
## [2.1.14](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-http-transformer@2.1.13...@aws-amplify/graphql-http-transformer@2.1.14) (2023-12-18)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @aws-amplify/graphql-http-transformer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-http-transformer",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.15",
|
4
4
|
"description": "Amplify GraphQL @http transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -28,14 +28,14 @@
|
|
28
28
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
31
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
32
32
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
33
33
|
"graphql": "^15.5.0",
|
34
34
|
"graphql-mapping-template": "4.20.14",
|
35
35
|
"graphql-transformer-common": "4.27.1"
|
36
36
|
},
|
37
37
|
"devDependencies": {
|
38
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
38
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
41
|
"aws-cdk-lib": "^2.80.0",
|
@@ -69,7 +69,8 @@
|
|
69
69
|
],
|
70
70
|
"modulePathIgnorePatterns": [
|
71
71
|
"overrides"
|
72
|
-
]
|
72
|
+
],
|
73
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
73
74
|
},
|
74
|
-
"gitHead": "
|
75
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
75
76
|
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.3.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.3.2...@aws-amplify/graphql-index-transformer@2.3.3) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-index-transformer
|
9
|
+
|
6
10
|
## [2.3.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-index-transformer@2.3.1...@aws-amplify/graphql-index-transformer@2.3.2) (2023-12-18)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @aws-amplify/graphql-index-transformer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-index-transformer",
|
3
|
-
"version": "2.3.
|
3
|
+
"version": "2.3.3",
|
4
4
|
"description": "Amplify GraphQL index and key transformers",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -28,15 +28,15 @@
|
|
28
28
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@aws-amplify/graphql-model-transformer": "2.4.
|
32
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
31
|
+
"@aws-amplify/graphql-model-transformer": "2.4.3",
|
32
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
33
33
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
34
34
|
"graphql": "^15.5.0",
|
35
35
|
"graphql-mapping-template": "4.20.14",
|
36
36
|
"graphql-transformer-common": "4.27.1"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
39
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|
42
42
|
"aws-cdk-lib": "^2.80.0",
|
@@ -67,7 +67,8 @@
|
|
67
67
|
"coverageReporters": [
|
68
68
|
"clover",
|
69
69
|
"text"
|
70
|
-
]
|
70
|
+
],
|
71
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
71
72
|
},
|
72
|
-
"gitHead": "
|
73
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
73
74
|
}
|
@@ -3,6 +3,14 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [3.4.4](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.3...@aws-amplify/graphql-maps-to-transformer@3.4.4) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
|
9
|
+
|
10
|
+
## [3.4.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.2...@aws-amplify/graphql-maps-to-transformer@3.4.3) (2023-12-21)
|
11
|
+
|
12
|
+
**Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
|
13
|
+
|
6
14
|
## [3.4.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-maps-to-transformer@3.4.1...@aws-amplify/graphql-maps-to-transformer@3.4.2) (2023-12-18)
|
7
15
|
|
8
16
|
**Note:** Version bump only for package @aws-amplify/graphql-maps-to-transformer
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-maps-to-transformer",
|
3
|
-
"version": "3.4.
|
3
|
+
"version": "3.4.4",
|
4
4
|
"description": "Amplify GraphQL @mapsTo transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
33
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
34
34
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
35
35
|
"graphql-mapping-template": "4.20.14",
|
36
36
|
"graphql-transformer-common": "4.27.1"
|
@@ -40,11 +40,11 @@
|
|
40
40
|
"constructs": "^10.0.5"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
|
-
"@aws-amplify/graphql-index-transformer": "2.3.
|
44
|
-
"@aws-amplify/graphql-model-transformer": "2.4.
|
45
|
-
"@aws-amplify/graphql-relational-transformer": "2.3.
|
46
|
-
"@aws-amplify/graphql-searchable-transformer": "2.
|
47
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
43
|
+
"@aws-amplify/graphql-index-transformer": "2.3.3",
|
44
|
+
"@aws-amplify/graphql-model-transformer": "2.4.3",
|
45
|
+
"@aws-amplify/graphql-relational-transformer": "2.3.4",
|
46
|
+
"@aws-amplify/graphql-searchable-transformer": "2.5.0",
|
47
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3",
|
48
48
|
"graphql": "^15.5.0"
|
49
49
|
},
|
50
50
|
"jest": {
|
@@ -76,7 +76,8 @@
|
|
76
76
|
"coverageReporters": [
|
77
77
|
"clover",
|
78
78
|
"text"
|
79
|
-
]
|
79
|
+
],
|
80
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
80
81
|
},
|
81
|
-
"gitHead": "
|
82
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
82
83
|
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.4.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-model-transformer@2.4.2...@aws-amplify/graphql-model-transformer@2.4.3) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-model-transformer
|
9
|
+
|
6
10
|
## [2.4.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-model-transformer@2.4.1...@aws-amplify/graphql-model-transformer@2.4.2) (2023-12-18)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @aws-amplify/graphql-model-transformer
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-model-transformer",
|
3
|
-
"version": "2.4.
|
3
|
+
"version": "2.4.3",
|
4
4
|
"description": "Amplify graphql @model transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
35
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
36
36
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
37
37
|
"graphql": "^15.5.0",
|
38
38
|
"graphql-mapping-template": "4.20.14",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"constructs": "^10.0.5"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
46
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3",
|
47
47
|
"@aws-sdk/client-dynamodb": "^3.431.0",
|
48
48
|
"@types/aws-lambda": "8.10.119",
|
49
49
|
"@types/node": "^12.12.6"
|
@@ -76,7 +76,8 @@
|
|
76
76
|
],
|
77
77
|
"modulePathIgnorePatterns": [
|
78
78
|
"overrides"
|
79
|
-
]
|
79
|
+
],
|
80
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
80
81
|
},
|
81
|
-
"gitHead": "
|
82
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
82
83
|
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.1.15](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-predictions-transformer@2.1.14...@aws-amplify/graphql-predictions-transformer@2.1.15) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-predictions-transformer
|
9
|
+
|
6
10
|
## [2.1.14](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-predictions-transformer@2.1.13...@aws-amplify/graphql-predictions-transformer@2.1.14) (2023-12-18)
|
7
11
|
|
8
12
|
**Note:** Version bump only for package @aws-amplify/graphql-predictions-transformer
|
package/node_modules/@aws-amplify/graphql-predictions-transformer/lib/predictionsLambdaFunction.zip
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-amplify/graphql-predictions-transformer",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.15",
|
4
4
|
"description": "Amplify GraphQL @predictions transformer",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"extract-api": "ts-node ../../scripts/extract-api.ts"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@aws-amplify/graphql-transformer-core": "2.4.
|
31
|
+
"@aws-amplify/graphql-transformer-core": "2.4.3",
|
32
32
|
"@aws-amplify/graphql-transformer-interfaces": "3.3.3",
|
33
33
|
"graphql": "^15.5.0",
|
34
34
|
"graphql-mapping-template": "4.20.14",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"constructs": "^10.0.5"
|
40
40
|
},
|
41
41
|
"devDependencies": {
|
42
|
-
"@aws-amplify/graphql-transformer-test-utils": "0.4.
|
42
|
+
"@aws-amplify/graphql-transformer-test-utils": "0.4.3",
|
43
43
|
"bestzip": "^2.1.5"
|
44
44
|
},
|
45
45
|
"jest": {
|
@@ -70,7 +70,8 @@
|
|
70
70
|
],
|
71
71
|
"modulePathIgnorePatterns": [
|
72
72
|
"overrides"
|
73
|
-
]
|
73
|
+
],
|
74
|
+
"testEnvironment": "../../FixJestEnvironment.js"
|
74
75
|
},
|
75
|
-
"gitHead": "
|
76
|
+
"gitHead": "7f17ef972d6acd0c3ca8206f9264a74f21e83b72"
|
76
77
|
}
|
@@ -3,6 +3,16 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.3.4](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-relational-transformer@2.3.3...@aws-amplify/graphql-relational-transformer@2.3.4) (2024-01-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @aws-amplify/graphql-relational-transformer
|
9
|
+
|
10
|
+
## [2.3.3](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-relational-transformer@2.3.2...@aws-amplify/graphql-relational-transformer@2.3.3) (2023-12-21)
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
- Fix manyToMany relationships with Amplify managed table strategies ([#2151](https://github.com/aws-amplify/amplify-category-api/issues/2151)) ([2dccaa6](https://github.com/aws-amplify/amplify-category-api/commit/2dccaa6e76deb33627bb31ca90f6f126d53239d7))
|
15
|
+
|
6
16
|
## [2.3.2](https://github.com/aws-amplify/amplify-category-api/compare/@aws-amplify/graphql-relational-transformer@2.3.1...@aws-amplify/graphql-relational-transformer@2.3.2) (2023-12-18)
|
7
17
|
|
8
18
|
**Note:** Version bump only for package @aws-amplify/graphql-relational-transformer
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"graphql-many-to-many-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-many-to-many-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,
|
1
|
+
{"version":3,"file":"graphql-many-to-many-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-many-to-many-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,EAOtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,uBAAuB,EACvB,0BAA0B,EAC1B,qCAAqC,EACrC,yCAAyC,EACzC,6CAA6C,EAC7C,wCAAwC,EACxC,oCAAoC,EAGrC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,EAE3B,wBAAwB,EAEzB,MAAM,SAAS,CAAC;AAcjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAmB1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAgBlE,qBAAa,qBAAsB,SAAQ,qBAAqB;IAC9D,OAAO,CAAC,WAAW,CAAyC;IAE5D,OAAO,CAAC,aAAa,CAA0C;IAE/D,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,OAAO,CAAC,iBAAiB,CAAoB;IAE7C,OAAO,CAAC,YAAY,CAA0B;gBAG5C,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,uBAAuB;IASvC,KAAK,WACK,wBAAwB,GAAG,2BAA2B,cAClD,mBAAmB,aACpB,aAAa,WACf,yCAAyC,KACjD,IAAI,CAwBL;IAKF,YAAY,YAAa,oCAAoC,KAAG,YAAY,CAmJ1E;IAEF,QAAQ,QAAS,wCAAwC,KAAG,IAAI,CA4C9D;IAEF,OAAO,QAAS,qCAAqC,KAAG,IAAI,CAuK1D;IAEF,eAAe,QAAS,6CAA6C,KAAG,IAAI,CAO1E;IAEF,iBAAiB,QAAS,0BAA0B,KAAG,IAAI,CAOzD;CACH"}
|
@@ -38,7 +38,7 @@ class ManyToManyTransformer extends graphql_transformer_core_1.TransformerPlugin
|
|
38
38
|
}
|
39
39
|
addDirectiveToRelationMap(this.relationMap, args);
|
40
40
|
this.directiveList.push(args);
|
41
|
-
this.relationMap.forEach((
|
41
|
+
this.relationMap.forEach((manyToManyRelation, _) => addJoinTableToDatasourceStrategies(context, manyToManyRelation));
|
42
42
|
};
|
43
43
|
this.mutateSchema = (context) => {
|
44
44
|
const manyToManyMap = new Map();
|
@@ -175,6 +175,12 @@ class ManyToManyTransformer extends graphql_transformer_core_1.TransformerPlugin
|
|
175
175
|
if ((0, graphql_transformer_core_1.isSqlModel)(ctx, d1ExpectedType) || (0, graphql_transformer_core_1.isSqlModel)(ctx, d2ExpectedType)) {
|
176
176
|
throw new graphql_transformer_core_1.InvalidDirectiveError(`@${directiveName} directive cannot be used on a SQL model.`);
|
177
177
|
}
|
178
|
+
const d1Strategy = (0, graphql_transformer_core_1.getModelDataSourceStrategy)(ctx, d1ExpectedType);
|
179
|
+
const d2Strategy = (0, graphql_transformer_core_1.getModelDataSourceStrategy)(ctx, d2ExpectedType);
|
180
|
+
if (((0, graphql_transformer_core_1.isDefaultDynamoDbModelDataSourceStrategy)(d1Strategy) && !(0, graphql_transformer_core_1.isDefaultDynamoDbModelDataSourceStrategy)(d2Strategy)) ||
|
181
|
+
((0, graphql_transformer_core_1.isAmplifyDynamoDbModelDataSourceStrategy)(d1Strategy) && !(0, graphql_transformer_core_1.isAmplifyDynamoDbModelDataSourceStrategy)(d2Strategy))) {
|
182
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@${directiveName} directive cannot be used to relate models with a different DynamoDB-based strategies.`);
|
183
|
+
}
|
178
184
|
if (d1ExpectedType !== directive2.object.name.value) {
|
179
185
|
throw new graphql_transformer_core_1.InvalidDirectiveError(`@${directiveName} relation '${name}' expects '${d1ExpectedType}' but got '${directive2.object.name.value}'.`);
|
180
186
|
}
|
@@ -337,8 +343,10 @@ class ManyToManyTransformer extends graphql_transformer_core_1.TransformerPlugin
|
|
337
343
|
}
|
338
344
|
}
|
339
345
|
exports.ManyToManyTransformer = ManyToManyTransformer;
|
340
|
-
const addJoinTableToDatasourceStrategies = (ctx,
|
341
|
-
|
346
|
+
const addJoinTableToDatasourceStrategies = (ctx, manyToManyRelation) => {
|
347
|
+
const { name: relationName, directive1: { object: { name: { value: typeName }, }, }, } = manyToManyRelation;
|
348
|
+
const parentStrategy = (0, graphql_transformer_core_1.getModelDataSourceStrategy)(ctx, typeName);
|
349
|
+
ctx.dataSourceStrategies[relationName] = parentStrategy;
|
342
350
|
};
|
343
351
|
function addDirectiveToRelationMap(map, directive) {
|
344
352
|
const { relationName } = directive;
|