@aws-amplify/graphql-auth-transformer 0.2.0-graphql-vnext-dev-preview.0 → 0.2.0-graphql-vnext-dev-preview.5
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/CHANGELOG.md +143 -3
- package/lib/accesscontrol/acm.d.ts +3 -0
- package/lib/accesscontrol/acm.d.ts.map +1 -1
- package/lib/accesscontrol/acm.js +12 -4
- package/lib/accesscontrol/acm.js.map +1 -1
- package/lib/graphql-auth-transformer.d.ts +4 -2
- package/lib/graphql-auth-transformer.d.ts.map +1 -1
- package/lib/graphql-auth-transformer.js +133 -42
- package/lib/graphql-auth-transformer.js.map +1 -1
- package/lib/resolvers/field.d.ts +3 -1
- package/lib/resolvers/field.d.ts.map +1 -1
- package/lib/resolvers/field.js +36 -15
- package/lib/resolvers/field.js.map +1 -1
- package/lib/resolvers/helpers.d.ts +4 -2
- package/lib/resolvers/helpers.d.ts.map +1 -1
- package/lib/resolvers/helpers.js +37 -10
- package/lib/resolvers/helpers.js.map +1 -1
- package/lib/resolvers/index.d.ts +3 -2
- package/lib/resolvers/index.d.ts.map +1 -1
- package/lib/resolvers/index.js +5 -1
- package/lib/resolvers/index.js.map +1 -1
- package/lib/resolvers/mutation.create.d.ts.map +1 -1
- package/lib/resolvers/mutation.create.js +27 -20
- package/lib/resolvers/mutation.create.js.map +1 -1
- package/lib/resolvers/mutation.delete.d.ts.map +1 -1
- package/lib/resolvers/mutation.delete.js +21 -11
- package/lib/resolvers/mutation.delete.js.map +1 -1
- package/lib/resolvers/mutation.update.d.ts.map +1 -1
- package/lib/resolvers/mutation.update.js +25 -12
- package/lib/resolvers/mutation.update.js.map +1 -1
- package/lib/resolvers/query.d.ts +3 -2
- package/lib/resolvers/query.d.ts.map +1 -1
- package/lib/resolvers/query.js +145 -67
- package/lib/resolvers/query.js.map +1 -1
- package/lib/resolvers/search.d.ts +4 -0
- package/lib/resolvers/search.d.ts.map +1 -0
- package/lib/resolvers/search.js +173 -0
- package/lib/resolvers/search.js.map +1 -0
- package/lib/resolvers/subscriptions.d.ts.map +1 -1
- package/lib/resolvers/subscriptions.js +7 -4
- package/lib/resolvers/subscriptions.js.map +1 -1
- package/lib/utils/constants.d.ts +3 -2
- package/lib/utils/constants.d.ts.map +1 -1
- package/lib/utils/constants.js +10 -3
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/definitions.d.ts +18 -12
- package/lib/utils/definitions.d.ts.map +1 -1
- package/lib/utils/definitions.js +2 -0
- package/lib/utils/definitions.js.map +1 -1
- package/lib/utils/iam.js +1 -1
- package/lib/utils/iam.js.map +1 -1
- package/lib/utils/index.d.ts +2 -5
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +13 -44
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/schema.d.ts +7 -2
- package/lib/utils/schema.d.ts.map +1 -1
- package/lib/utils/schema.js +107 -1
- package/lib/utils/schema.js.map +1 -1
- package/lib/utils/validations.d.ts +2 -2
- package/lib/utils/validations.d.ts.map +1 -1
- package/lib/utils/validations.js +21 -3
- package/lib/utils/validations.js.map +1 -1
- package/package.json +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,14 +3,154 @@
|
|
|
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
|
-
# 0.2.0-graphql-vnext-dev-preview.
|
|
6
|
+
# 0.2.0-graphql-vnext-dev-preview.5 (2021-11-03)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
*
|
|
11
|
+
* [@auth](https://github.com/auth) fix relational auth, authv2 e2e with utils and fixes ([#8450](https://github.com/aws-amplify/amplify-cli/issues/8450)) ([aa320cd](https://github.com/aws-amplify/amplify-cli/commit/aa320cd2414665a484438f0764cf68fd78caa26a))
|
|
12
|
+
* [@function](https://github.com/function) vNext payload, remove unused code, and update common mapping tempalte function ([#8462](https://github.com/aws-amplify/amplify-cli/issues/8462)) ([24d0de9](https://github.com/aws-amplify/amplify-cli/commit/24d0de97a1bfacc3983e5b11a7582c9500759adc))
|
|
13
|
+
* add [@manytomany](https://github.com/manytomany) join table auth ([#8460](https://github.com/aws-amplify/amplify-cli/issues/8460)) ([424bbda](https://github.com/aws-amplify/amplify-cli/commit/424bbda410fbab100d475d37fa9ab291bfd05317))
|
|
14
|
+
* add field auth on aggregation queries ([#8508](https://github.com/aws-amplify/amplify-cli/issues/8508)) ([c0fa85a](https://github.com/aws-amplify/amplify-cli/commit/c0fa85a87230d631ffaf376f18f4fc3c4ec9a1f9))
|
|
15
|
+
* add schema directives for sync operation when conflict resolution is enabled ([#8521](https://github.com/aws-amplify/amplify-cli/issues/8521)) ([e3299e5](https://github.com/aws-amplify/amplify-cli/commit/e3299e5c09884218d486d4a488f343972674a417))
|
|
16
|
+
* auth on getting related model name and searchablevNext e2e ([#8455](https://github.com/aws-amplify/amplify-cli/issues/8455)) ([8536dd3](https://github.com/aws-amplify/amplify-cli/commit/8536dd3eb4cffc14602d80eea82b8b62b8227485))
|
|
17
|
+
* auth vnext validation fixes ([#8551](https://github.com/aws-amplify/amplify-cli/issues/8551)) ([2cfe6ce](https://github.com/aws-amplify/amplify-cli/commit/2cfe6ce15e9adb1e5824e3d011deb9e4d5cf5d4d))
|
|
18
|
+
* fix null check for implied owner check ([#8586](https://github.com/aws-amplify/amplify-cli/issues/8586)) ([4a0fda8](https://github.com/aws-amplify/amplify-cli/commit/4a0fda81472ec82d6731502bbe83a9ffd0b27198))
|
|
19
|
+
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
|
|
20
|
+
* update auth vnext validation to use private for oidc ([#8606](https://github.com/aws-amplify/amplify-cli/issues/8606)) ([8e659a1](https://github.com/aws-amplify/amplify-cli/commit/8e659a1357df63d5cae92b67f719ffeea9acacf0))
|
|
12
21
|
|
|
13
22
|
|
|
14
23
|
### Features
|
|
15
24
|
|
|
16
|
-
* add
|
|
25
|
+
* add admin roles which have admin control over a graphql api ([#8601](https://github.com/aws-amplify/amplify-cli/issues/8601)) ([4d50df0](https://github.com/aws-amplify/amplify-cli/commit/4d50df000c6e11165d2da766c0eaa0097d88a0c2))
|
|
26
|
+
* allow optional idp arg into auth to allow provided auth role or authenticated identity ([#8609](https://github.com/aws-amplify/amplify-cli/issues/8609)) ([bf843b9](https://github.com/aws-amplify/amplify-cli/commit/bf843b90330d8ceb2ea90bc2761edd57e5d5123b))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# 0.2.0-graphql-vnext-dev-preview.4 (2021-11-03)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* [@auth](https://github.com/auth) fix relational auth, authv2 e2e with utils and fixes ([#8450](https://github.com/aws-amplify/amplify-cli/issues/8450)) ([aa320cd](https://github.com/aws-amplify/amplify-cli/commit/aa320cd2414665a484438f0764cf68fd78caa26a))
|
|
38
|
+
* [@function](https://github.com/function) vNext payload, remove unused code, and update common mapping tempalte function ([#8462](https://github.com/aws-amplify/amplify-cli/issues/8462)) ([24d0de9](https://github.com/aws-amplify/amplify-cli/commit/24d0de97a1bfacc3983e5b11a7582c9500759adc))
|
|
39
|
+
* add [@manytomany](https://github.com/manytomany) join table auth ([#8460](https://github.com/aws-amplify/amplify-cli/issues/8460)) ([424bbda](https://github.com/aws-amplify/amplify-cli/commit/424bbda410fbab100d475d37fa9ab291bfd05317))
|
|
40
|
+
* add field auth on aggregation queries ([#8508](https://github.com/aws-amplify/amplify-cli/issues/8508)) ([c0fa85a](https://github.com/aws-amplify/amplify-cli/commit/c0fa85a87230d631ffaf376f18f4fc3c4ec9a1f9))
|
|
41
|
+
* add schema directives for sync operation when conflict resolution is enabled ([#8521](https://github.com/aws-amplify/amplify-cli/issues/8521)) ([e3299e5](https://github.com/aws-amplify/amplify-cli/commit/e3299e5c09884218d486d4a488f343972674a417))
|
|
42
|
+
* auth on getting related model name and searchablevNext e2e ([#8455](https://github.com/aws-amplify/amplify-cli/issues/8455)) ([8536dd3](https://github.com/aws-amplify/amplify-cli/commit/8536dd3eb4cffc14602d80eea82b8b62b8227485))
|
|
43
|
+
* auth vnext validation fixes ([#8551](https://github.com/aws-amplify/amplify-cli/issues/8551)) ([2cfe6ce](https://github.com/aws-amplify/amplify-cli/commit/2cfe6ce15e9adb1e5824e3d011deb9e4d5cf5d4d))
|
|
44
|
+
* fix null check for implied owner check ([#8586](https://github.com/aws-amplify/amplify-cli/issues/8586)) ([4a0fda8](https://github.com/aws-amplify/amplify-cli/commit/4a0fda81472ec82d6731502bbe83a9ffd0b27198))
|
|
45
|
+
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
|
|
46
|
+
* update auth vnext validation to use private for oidc ([#8606](https://github.com/aws-amplify/amplify-cli/issues/8606)) ([8e659a1](https://github.com/aws-amplify/amplify-cli/commit/8e659a1357df63d5cae92b67f719ffeea9acacf0))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
* add admin roles which have admin control over a graphql api ([#8601](https://github.com/aws-amplify/amplify-cli/issues/8601)) ([4d50df0](https://github.com/aws-amplify/amplify-cli/commit/4d50df000c6e11165d2da766c0eaa0097d88a0c2))
|
|
52
|
+
* allow optional idp arg into auth to allow provided auth role or authenticated identity ([#8609](https://github.com/aws-amplify/amplify-cli/issues/8609)) ([bf843b9](https://github.com/aws-amplify/amplify-cli/commit/bf843b90330d8ceb2ea90bc2761edd57e5d5123b))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# 0.2.0-graphql-vnext-dev-preview.3 (2021-11-03)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Bug Fixes
|
|
62
|
+
|
|
63
|
+
* [@auth](https://github.com/auth) fix relational auth, authv2 e2e with utils and fixes ([#8450](https://github.com/aws-amplify/amplify-cli/issues/8450)) ([aa320cd](https://github.com/aws-amplify/amplify-cli/commit/aa320cd2414665a484438f0764cf68fd78caa26a))
|
|
64
|
+
* [@function](https://github.com/function) vNext payload, remove unused code, and update common mapping tempalte function ([#8462](https://github.com/aws-amplify/amplify-cli/issues/8462)) ([24d0de9](https://github.com/aws-amplify/amplify-cli/commit/24d0de97a1bfacc3983e5b11a7582c9500759adc))
|
|
65
|
+
* add [@manytomany](https://github.com/manytomany) join table auth ([#8460](https://github.com/aws-amplify/amplify-cli/issues/8460)) ([424bbda](https://github.com/aws-amplify/amplify-cli/commit/424bbda410fbab100d475d37fa9ab291bfd05317))
|
|
66
|
+
* add field auth on aggregation queries ([#8508](https://github.com/aws-amplify/amplify-cli/issues/8508)) ([c0fa85a](https://github.com/aws-amplify/amplify-cli/commit/c0fa85a87230d631ffaf376f18f4fc3c4ec9a1f9))
|
|
67
|
+
* add schema directives for sync operation when conflict resolution is enabled ([#8521](https://github.com/aws-amplify/amplify-cli/issues/8521)) ([e3299e5](https://github.com/aws-amplify/amplify-cli/commit/e3299e5c09884218d486d4a488f343972674a417))
|
|
68
|
+
* auth on getting related model name and searchablevNext e2e ([#8455](https://github.com/aws-amplify/amplify-cli/issues/8455)) ([8536dd3](https://github.com/aws-amplify/amplify-cli/commit/8536dd3eb4cffc14602d80eea82b8b62b8227485))
|
|
69
|
+
* auth vnext validation fixes ([#8551](https://github.com/aws-amplify/amplify-cli/issues/8551)) ([2cfe6ce](https://github.com/aws-amplify/amplify-cli/commit/2cfe6ce15e9adb1e5824e3d011deb9e4d5cf5d4d))
|
|
70
|
+
* fix null check for implied owner check ([#8586](https://github.com/aws-amplify/amplify-cli/issues/8586)) ([4a0fda8](https://github.com/aws-amplify/amplify-cli/commit/4a0fda81472ec82d6731502bbe83a9ffd0b27198))
|
|
71
|
+
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
|
|
72
|
+
* update auth vnext validation to use private for oidc ([#8606](https://github.com/aws-amplify/amplify-cli/issues/8606)) ([8e659a1](https://github.com/aws-amplify/amplify-cli/commit/8e659a1357df63d5cae92b67f719ffeea9acacf0))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Features
|
|
76
|
+
|
|
77
|
+
* add admin roles which have admin control over a graphql api ([#8601](https://github.com/aws-amplify/amplify-cli/issues/8601)) ([4d50df0](https://github.com/aws-amplify/amplify-cli/commit/4d50df000c6e11165d2da766c0eaa0097d88a0c2))
|
|
78
|
+
* allow optional idp arg into auth to allow provided auth role or authenticated identity ([#8609](https://github.com/aws-amplify/amplify-cli/issues/8609)) ([bf843b9](https://github.com/aws-amplify/amplify-cli/commit/bf843b90330d8ceb2ea90bc2761edd57e5d5123b))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# 0.2.0-graphql-vnext-dev-preview.2 (2021-11-03)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Bug Fixes
|
|
88
|
+
|
|
89
|
+
* [@auth](https://github.com/auth) fix relational auth, authv2 e2e with utils and fixes ([#8450](https://github.com/aws-amplify/amplify-cli/issues/8450)) ([aa320cd](https://github.com/aws-amplify/amplify-cli/commit/aa320cd2414665a484438f0764cf68fd78caa26a))
|
|
90
|
+
* [@function](https://github.com/function) vNext payload, remove unused code, and update common mapping tempalte function ([#8462](https://github.com/aws-amplify/amplify-cli/issues/8462)) ([24d0de9](https://github.com/aws-amplify/amplify-cli/commit/24d0de97a1bfacc3983e5b11a7582c9500759adc))
|
|
91
|
+
* add [@manytomany](https://github.com/manytomany) join table auth ([#8460](https://github.com/aws-amplify/amplify-cli/issues/8460)) ([424bbda](https://github.com/aws-amplify/amplify-cli/commit/424bbda410fbab100d475d37fa9ab291bfd05317))
|
|
92
|
+
* add field auth on aggregation queries ([#8508](https://github.com/aws-amplify/amplify-cli/issues/8508)) ([c0fa85a](https://github.com/aws-amplify/amplify-cli/commit/c0fa85a87230d631ffaf376f18f4fc3c4ec9a1f9))
|
|
93
|
+
* add schema directives for sync operation when conflict resolution is enabled ([#8521](https://github.com/aws-amplify/amplify-cli/issues/8521)) ([e3299e5](https://github.com/aws-amplify/amplify-cli/commit/e3299e5c09884218d486d4a488f343972674a417))
|
|
94
|
+
* auth on getting related model name and searchablevNext e2e ([#8455](https://github.com/aws-amplify/amplify-cli/issues/8455)) ([8536dd3](https://github.com/aws-amplify/amplify-cli/commit/8536dd3eb4cffc14602d80eea82b8b62b8227485))
|
|
95
|
+
* auth vnext validation fixes ([#8551](https://github.com/aws-amplify/amplify-cli/issues/8551)) ([2cfe6ce](https://github.com/aws-amplify/amplify-cli/commit/2cfe6ce15e9adb1e5824e3d011deb9e4d5cf5d4d))
|
|
96
|
+
* fix null check for implied owner check ([#8586](https://github.com/aws-amplify/amplify-cli/issues/8586)) ([4a0fda8](https://github.com/aws-amplify/amplify-cli/commit/4a0fda81472ec82d6731502bbe83a9ffd0b27198))
|
|
97
|
+
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
|
|
98
|
+
* update auth vnext validation to use private for oidc ([#8606](https://github.com/aws-amplify/amplify-cli/issues/8606)) ([8e659a1](https://github.com/aws-amplify/amplify-cli/commit/8e659a1357df63d5cae92b67f719ffeea9acacf0))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* add admin roles which have admin control over a graphql api ([#8601](https://github.com/aws-amplify/amplify-cli/issues/8601)) ([4d50df0](https://github.com/aws-amplify/amplify-cli/commit/4d50df000c6e11165d2da766c0eaa0097d88a0c2))
|
|
104
|
+
* allow optional idp arg into auth to allow provided auth role or authenticated identity ([#8609](https://github.com/aws-amplify/amplify-cli/issues/8609)) ([bf843b9](https://github.com/aws-amplify/amplify-cli/commit/bf843b90330d8ceb2ea90bc2761edd57e5d5123b))
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# 0.2.0-graphql-vnext-dev-preview.1 (2021-11-03)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Bug Fixes
|
|
114
|
+
|
|
115
|
+
* [@auth](https://github.com/auth) fix relational auth, authv2 e2e with utils and fixes ([#8450](https://github.com/aws-amplify/amplify-cli/issues/8450)) ([aa320cd](https://github.com/aws-amplify/amplify-cli/commit/aa320cd2414665a484438f0764cf68fd78caa26a))
|
|
116
|
+
* [@function](https://github.com/function) vNext payload, remove unused code, and update common mapping tempalte function ([#8462](https://github.com/aws-amplify/amplify-cli/issues/8462)) ([24d0de9](https://github.com/aws-amplify/amplify-cli/commit/24d0de97a1bfacc3983e5b11a7582c9500759adc))
|
|
117
|
+
* add [@manytomany](https://github.com/manytomany) join table auth ([#8460](https://github.com/aws-amplify/amplify-cli/issues/8460)) ([424bbda](https://github.com/aws-amplify/amplify-cli/commit/424bbda410fbab100d475d37fa9ab291bfd05317))
|
|
118
|
+
* add field auth on aggregation queries ([#8508](https://github.com/aws-amplify/amplify-cli/issues/8508)) ([c0fa85a](https://github.com/aws-amplify/amplify-cli/commit/c0fa85a87230d631ffaf376f18f4fc3c4ec9a1f9))
|
|
119
|
+
* add schema directives for sync operation when conflict resolution is enabled ([#8521](https://github.com/aws-amplify/amplify-cli/issues/8521)) ([e3299e5](https://github.com/aws-amplify/amplify-cli/commit/e3299e5c09884218d486d4a488f343972674a417))
|
|
120
|
+
* auth on getting related model name and searchablevNext e2e ([#8455](https://github.com/aws-amplify/amplify-cli/issues/8455)) ([8536dd3](https://github.com/aws-amplify/amplify-cli/commit/8536dd3eb4cffc14602d80eea82b8b62b8227485))
|
|
121
|
+
* auth vnext validation fixes ([#8551](https://github.com/aws-amplify/amplify-cli/issues/8551)) ([2cfe6ce](https://github.com/aws-amplify/amplify-cli/commit/2cfe6ce15e9adb1e5824e3d011deb9e4d5cf5d4d))
|
|
122
|
+
* fix null check for implied owner check ([#8586](https://github.com/aws-amplify/amplify-cli/issues/8586)) ([4a0fda8](https://github.com/aws-amplify/amplify-cli/commit/4a0fda81472ec82d6731502bbe83a9ffd0b27198))
|
|
123
|
+
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
|
|
124
|
+
* update auth vnext validation to use private for oidc ([#8606](https://github.com/aws-amplify/amplify-cli/issues/8606)) ([8e659a1](https://github.com/aws-amplify/amplify-cli/commit/8e659a1357df63d5cae92b67f719ffeea9acacf0))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Features
|
|
128
|
+
|
|
129
|
+
* add admin roles which have admin control over a graphql api ([#8601](https://github.com/aws-amplify/amplify-cli/issues/8601)) ([4d50df0](https://github.com/aws-amplify/amplify-cli/commit/4d50df000c6e11165d2da766c0eaa0097d88a0c2))
|
|
130
|
+
* allow optional idp arg into auth to allow provided auth role or authenticated identity ([#8609](https://github.com/aws-amplify/amplify-cli/issues/8609)) ([bf843b9](https://github.com/aws-amplify/amplify-cli/commit/bf843b90330d8ceb2ea90bc2761edd57e5d5123b))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
# 0.2.0-graphql-vnext-dev-preview.0 (2021-11-03)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Bug Fixes
|
|
140
|
+
|
|
141
|
+
* [@auth](https://github.com/auth) fix relational auth, authv2 e2e with utils and fixes ([#8450](https://github.com/aws-amplify/amplify-cli/issues/8450)) ([aa320cd](https://github.com/aws-amplify/amplify-cli/commit/aa320cd2414665a484438f0764cf68fd78caa26a))
|
|
142
|
+
* [@function](https://github.com/function) vNext payload, remove unused code, and update common mapping tempalte function ([#8462](https://github.com/aws-amplify/amplify-cli/issues/8462)) ([24d0de9](https://github.com/aws-amplify/amplify-cli/commit/24d0de97a1bfacc3983e5b11a7582c9500759adc))
|
|
143
|
+
* add [@manytomany](https://github.com/manytomany) join table auth ([#8460](https://github.com/aws-amplify/amplify-cli/issues/8460)) ([424bbda](https://github.com/aws-amplify/amplify-cli/commit/424bbda410fbab100d475d37fa9ab291bfd05317))
|
|
144
|
+
* add field auth on aggregation queries ([#8508](https://github.com/aws-amplify/amplify-cli/issues/8508)) ([c0fa85a](https://github.com/aws-amplify/amplify-cli/commit/c0fa85a87230d631ffaf376f18f4fc3c4ec9a1f9))
|
|
145
|
+
* add schema directives for sync operation when conflict resolution is enabled ([#8521](https://github.com/aws-amplify/amplify-cli/issues/8521)) ([e3299e5](https://github.com/aws-amplify/amplify-cli/commit/e3299e5c09884218d486d4a488f343972674a417))
|
|
146
|
+
* auth on getting related model name and searchablevNext e2e ([#8455](https://github.com/aws-amplify/amplify-cli/issues/8455)) ([8536dd3](https://github.com/aws-amplify/amplify-cli/commit/8536dd3eb4cffc14602d80eea82b8b62b8227485))
|
|
147
|
+
* auth vnext validation fixes ([#8551](https://github.com/aws-amplify/amplify-cli/issues/8551)) ([2cfe6ce](https://github.com/aws-amplify/amplify-cli/commit/2cfe6ce15e9adb1e5824e3d011deb9e4d5cf5d4d))
|
|
148
|
+
* fix null check for implied owner check ([#8586](https://github.com/aws-amplify/amplify-cli/issues/8586)) ([4a0fda8](https://github.com/aws-amplify/amplify-cli/commit/4a0fda81472ec82d6731502bbe83a9ffd0b27198))
|
|
149
|
+
* **graphql-model-transformer:** override resource logical id to fix v1 to v2 transformer migration ([#8597](https://github.com/aws-amplify/amplify-cli/issues/8597)) ([e3a2afb](https://github.com/aws-amplify/amplify-cli/commit/e3a2afbbed6e97f143fc7c83064e2193f4c91bdd))
|
|
150
|
+
* update auth vnext validation to use private for oidc ([#8606](https://github.com/aws-amplify/amplify-cli/issues/8606)) ([8e659a1](https://github.com/aws-amplify/amplify-cli/commit/8e659a1357df63d5cae92b67f719ffeea9acacf0))
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### Features
|
|
154
|
+
|
|
155
|
+
* add admin roles which have admin control over a graphql api ([#8601](https://github.com/aws-amplify/amplify-cli/issues/8601)) ([4d50df0](https://github.com/aws-amplify/amplify-cli/commit/4d50df000c6e11165d2da766c0eaa0097d88a0c2))
|
|
156
|
+
* allow optional idp arg into auth to allow provided auth role or authenticated identity ([#8609](https://github.com/aws-amplify/amplify-cli/issues/8609)) ([bf843b9](https://github.com/aws-amplify/amplify-cli/commit/bf843b90330d8ceb2ea90bc2761edd57e5d5123b))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare type ACMConfig = {
|
|
2
2
|
resources: string[];
|
|
3
3
|
operations: string[];
|
|
4
|
+
name: string;
|
|
4
5
|
};
|
|
5
6
|
declare type SetRoleInput = {
|
|
6
7
|
role: string;
|
|
@@ -8,6 +9,7 @@ declare type SetRoleInput = {
|
|
|
8
9
|
resource?: string;
|
|
9
10
|
};
|
|
10
11
|
export declare class AccessControlMatrix {
|
|
12
|
+
private name;
|
|
11
13
|
private roles;
|
|
12
14
|
private operations;
|
|
13
15
|
private resources;
|
|
@@ -17,6 +19,7 @@ export declare class AccessControlMatrix {
|
|
|
17
19
|
hasRole(role: string): boolean;
|
|
18
20
|
getRoles(): Array<string>;
|
|
19
21
|
getResources(): Readonly<Array<string>>;
|
|
22
|
+
hasResource(resource: string): boolean;
|
|
20
23
|
isAllowed(role: string, resource: string, operation: string): boolean;
|
|
21
24
|
resetAccessForResource(resource: string): void;
|
|
22
25
|
getRolesPerOperation(operation: string, fullAccess?: boolean): Array<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acm.d.ts","sourceRoot":"","sources":["../../src/accesscontrol/acm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"acm.d.ts","sourceRoot":"","sources":["../../src/accesscontrol/acm.ts"],"names":[],"mappings":"AAGA,aAAK,SAAS,GAAG;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,aAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAqBF,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,MAAM,CAA+B;gBAEjC,MAAM,EAAE,SAAS;IAQtB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAkBlC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC;IAIzB,YAAY,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAIvC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAItC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAQrE,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAe9C,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,GAAE,OAAe,GAAG,KAAK,CAAC,MAAM,CAAC;IAwBnF,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAkB3C,OAAO,CAAC,QAAQ;IAuBhB,OAAO,CAAC,0BAA0B;IAyBlC,OAAO,CAAC,gBAAgB;CAOzB"}
|
package/lib/accesscontrol/acm.js
CHANGED
|
@@ -5,8 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AccessControlMatrix = void 0;
|
|
7
7
|
const assert_1 = __importDefault(require("assert"));
|
|
8
|
+
const graphql_transformer_core_1 = require("@aws-amplify/graphql-transformer-core");
|
|
8
9
|
class AccessControlMatrix {
|
|
9
10
|
constructor(config) {
|
|
11
|
+
this.name = config.name;
|
|
10
12
|
this.operations = config.operations;
|
|
11
13
|
this.resources = config.resources;
|
|
12
14
|
this.matrix = new Array();
|
|
@@ -22,11 +24,14 @@ class AccessControlMatrix {
|
|
|
22
24
|
this.matrix.push(allowedVector);
|
|
23
25
|
assert_1.default(this.roles.length === this.matrix.length, 'Roles are not aligned with Roles added in Matrix');
|
|
24
26
|
}
|
|
25
|
-
else {
|
|
27
|
+
else if (this.roles.includes(role) && resource) {
|
|
26
28
|
allowedVector = this.getResourceOperationMatrix({ operations, resource, role });
|
|
27
29
|
const roleIndex = this.roles.indexOf(role);
|
|
28
30
|
this.matrix[roleIndex] = allowedVector;
|
|
29
31
|
}
|
|
32
|
+
else {
|
|
33
|
+
throw new graphql_transformer_core_1.InvalidDirectiveError(`@auth ${role} already exists for ${this.name}`);
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
hasRole(role) {
|
|
32
37
|
return this.roles.includes(role);
|
|
@@ -37,6 +42,9 @@ class AccessControlMatrix {
|
|
|
37
42
|
getResources() {
|
|
38
43
|
return this.resources;
|
|
39
44
|
}
|
|
45
|
+
hasResource(resource) {
|
|
46
|
+
return this.resources.includes(resource);
|
|
47
|
+
}
|
|
40
48
|
isAllowed(role, resource, operation) {
|
|
41
49
|
this.validate({ role, resource, operations: [operation] });
|
|
42
50
|
const roleIndex = this.roles.indexOf(role);
|
|
@@ -88,15 +96,15 @@ class AccessControlMatrix {
|
|
|
88
96
|
}
|
|
89
97
|
validate(input) {
|
|
90
98
|
if (input.resource && !this.resources.includes(input.resource)) {
|
|
91
|
-
throw
|
|
99
|
+
throw new graphql_transformer_core_1.TransformerContractError(`Resource: ${input.resource} is not configued in the ACM`);
|
|
92
100
|
}
|
|
93
101
|
if (input.role && !this.roles.includes(input.role)) {
|
|
94
|
-
throw
|
|
102
|
+
throw new graphql_transformer_core_1.TransformerContractError(`Role: ${input.role} does not exist in ACM.`);
|
|
95
103
|
}
|
|
96
104
|
if (input.operations) {
|
|
97
105
|
input.operations.forEach(operation => {
|
|
98
106
|
if (this.operations.indexOf(operation) === -1)
|
|
99
|
-
throw
|
|
107
|
+
throw new graphql_transformer_core_1.TransformerContractError(`Operation: ${operation} does not exist in the ACM.`);
|
|
100
108
|
});
|
|
101
109
|
}
|
|
102
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acm.js","sourceRoot":"","sources":["../../src/accesscontrol/acm.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;
|
|
1
|
+
{"version":3,"file":"acm.js","sourceRoot":"","sources":["../../src/accesscontrol/acm.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,oFAAwG;AAiCxG,MAAa,mBAAmB;IAO9B,YAAY,MAAiB;QAC3B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,KA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Aa,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;SACpD;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAzKD,kDAyKC"}
|
|
@@ -15,7 +15,7 @@ export declare class AuthTransformer extends TransformerAuthBase implements Tran
|
|
|
15
15
|
private generateIAMPolicyforAuthRole;
|
|
16
16
|
private authPolicyResources;
|
|
17
17
|
private unauthPolicyResources;
|
|
18
|
-
constructor(config
|
|
18
|
+
constructor(config?: AuthTransformerConfig);
|
|
19
19
|
before: (context: TransformerBeforeStepContextProvider) => void;
|
|
20
20
|
object: (def: ObjectTypeDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
21
21
|
field: (parent: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, field: FieldDefinitionNode, directive: DirectiveNode, context: TransformerSchemaVisitStepContextProvider) => void;
|
|
@@ -23,7 +23,8 @@ export declare class AuthTransformer extends TransformerAuthBase implements Tran
|
|
|
23
23
|
generateResolvers: (context: TransformerContextProvider) => void;
|
|
24
24
|
protectSchemaOperations: (ctx: TransformerTransformSchemaStepContextProvider, def: ObjectTypeDefinitionNode, acm: AccessControlMatrix) => void;
|
|
25
25
|
protectGetResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, fieldName: string, acm: AccessControlMatrix) => void;
|
|
26
|
-
protectListResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, fieldName: string, acm: AccessControlMatrix) => void;
|
|
26
|
+
protectListResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, fieldName: string, acm: AccessControlMatrix, indexName?: string) => void;
|
|
27
|
+
protectRelationalResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, field: FieldDefinitionNode, fieldRoles: Array<string> | null) => void;
|
|
27
28
|
protectSyncResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, fieldName: string, acm: AccessControlMatrix) => void;
|
|
28
29
|
protectSearchResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, fieldName: string, acm: AccessControlMatrix) => void;
|
|
29
30
|
protectFieldResolver: (ctx: TransformerContextProvider, def: ObjectTypeDefinitionNode, typeName: string, fieldName: string, roles: Array<string>) => void;
|
|
@@ -34,6 +35,7 @@ export declare class AuthTransformer extends TransformerAuthBase implements Tran
|
|
|
34
35
|
private convertRulesToRoles;
|
|
35
36
|
private doesTypeHaveRulesForOperation;
|
|
36
37
|
private getAuthProviders;
|
|
38
|
+
private getRelatedModelObject;
|
|
37
39
|
private addFieldsToObject;
|
|
38
40
|
private propagateAuthDirectivesToNestedTypes;
|
|
39
41
|
private getServiceDirectives;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-auth-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-auth-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAMpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAIL,6CAA6C,EAC7C,0BAA0B,EAE1B,yCAAyC,EACzC,uBAAuB,EACvB,oCAAoC,EACrC,MAAM,6CAA6C,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-auth-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-auth-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAMpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAIL,6CAA6C,EAC7C,0BAA0B,EAE1B,yCAAyC,EACzC,uBAAuB,EACvB,oCAAoC,EACrC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAYL,qBAAqB,EASrB,cAAc,EAef,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAG5B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,mBAAmB,EAAE,MAAM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