@aws-amplify/graphql-model-transformer 0.7.0-graphql-vnext-dev-preview.2 → 0.7.0-graphql-vnext-dev-preview.8
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 +191 -11
- package/lib/graphql-model-transformer.d.ts +15 -10
- package/lib/graphql-model-transformer.d.ts.map +1 -1
- package/lib/graphql-model-transformer.js +89 -37
- package/lib/graphql-model-transformer.js.map +1 -1
- package/lib/graphql-types/mutation.d.ts.map +1 -1
- package/lib/graphql-types/mutation.js +2 -5
- package/lib/graphql-types/mutation.js.map +1 -1
- package/lib/graphql-types/query.js +1 -1
- package/lib/graphql-types/query.js.map +1 -1
- package/lib/wrappers/object-definition-wrapper.d.ts +2 -15
- package/lib/wrappers/object-definition-wrapper.d.ts.map +1 -1
- package/lib/wrappers/object-definition-wrapper.js +7 -43
- package/lib/wrappers/object-definition-wrapper.js.map +1 -1
- package/package.json +6 -6
- package/src/__tests__/__snapshots__/model-transformer.test.ts.snap +62 -14
- package/src/__tests__/model-transformer.test.ts +173 -14
- package/src/graphql-model-transformer.ts +135 -33
- package/src/graphql-types/mutation.ts +2 -4
- package/src/graphql-types/query.ts +1 -1
- package/src/wrappers/object-definition-wrapper.ts +2 -52
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,40 +3,220 @@
|
|
|
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.7.0-graphql-vnext-dev-preview.
|
|
6
|
+
# [0.7.0-graphql-vnext-dev-preview.8](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.8) (2021-11-11)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package @aws-amplify/graphql-model-transformer
|
|
9
8
|
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
12
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
13
|
+
* **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))
|
|
14
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
15
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
16
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
17
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
10
23
|
|
|
11
24
|
|
|
12
25
|
|
|
13
26
|
|
|
14
|
-
|
|
27
|
+
|
|
28
|
+
# [0.7.0-graphql-vnext-dev-preview.7](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.7) (2021-11-11)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
34
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
35
|
+
* **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))
|
|
36
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
37
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
38
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
39
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
15
40
|
|
|
16
41
|
|
|
17
42
|
### Features
|
|
18
43
|
|
|
19
|
-
*
|
|
44
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
20
45
|
|
|
21
46
|
|
|
22
47
|
|
|
23
48
|
|
|
24
49
|
|
|
25
|
-
# [0.7.0-graphql-vnext-dev-preview.
|
|
50
|
+
# [0.7.0-graphql-vnext-dev-preview.6](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.6) (2021-11-11)
|
|
26
51
|
|
|
27
52
|
|
|
28
53
|
### Bug Fixes
|
|
29
54
|
|
|
30
|
-
*
|
|
31
|
-
* **graphql-model-transformer:**
|
|
32
|
-
* **graphql-model-transformer:**
|
|
33
|
-
* **graphql-model-transformer:**
|
|
55
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
56
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
57
|
+
* **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))
|
|
58
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
59
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
60
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
61
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Features
|
|
65
|
+
|
|
66
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# [0.7.0-graphql-vnext-dev-preview.5](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.5) (2021-11-11)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
78
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
79
|
+
* **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))
|
|
80
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
81
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
82
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
83
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Features
|
|
87
|
+
|
|
88
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
# [0.7.0-graphql-vnext-dev-preview.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.4) (2021-11-11)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Bug Fixes
|
|
98
|
+
|
|
99
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
100
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
101
|
+
* **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))
|
|
102
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
103
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
104
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
105
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Features
|
|
109
|
+
|
|
110
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# [0.7.0-graphql-vnext-dev-preview.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.3) (2021-11-11)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
122
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
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
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
125
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
126
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
127
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### Features
|
|
131
|
+
|
|
132
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# [0.7.0-graphql-vnext-dev-preview.2](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.2) (2021-11-11)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
144
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
145
|
+
* **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))
|
|
146
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
147
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
148
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
149
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Features
|
|
153
|
+
|
|
154
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
# [0.7.0-graphql-vnext-dev-preview.1](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.1) (2021-11-11)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Bug Fixes
|
|
164
|
+
|
|
165
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
166
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
167
|
+
* **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))
|
|
168
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
169
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
170
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
171
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
### Features
|
|
175
|
+
|
|
176
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
# [0.7.0-graphql-vnext-dev-preview.0](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.4...@aws-amplify/graphql-model-transformer@0.7.0-graphql-vnext-dev-preview.0) (2021-11-11)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### Bug Fixes
|
|
186
|
+
|
|
187
|
+
* datastore logical id ([#8761](https://github.com/aws-amplify/amplify-cli/issues/8761)) ([e86cbb9](https://github.com/aws-amplify/amplify-cli/commit/e86cbb9ebfb7ed22607ffd82f15a6b58a6ec7b3d))
|
|
188
|
+
* **graphql-model-transformer:** fixed model transformer ID generation when ID field is not specified ([#8633](https://github.com/aws-amplify/amplify-cli/issues/8633)) ([b515d16](https://github.com/aws-amplify/amplify-cli/commit/b515d1617a98d613b2d9feb424ece12204d63402))
|
|
189
|
+
* **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))
|
|
190
|
+
* **graphql-model-transformer:** subscription resolver logical id fix ([#8712](https://github.com/aws-amplify/amplify-cli/issues/8712)) ([f562f37](https://github.com/aws-amplify/amplify-cli/commit/f562f3714b83903c71217c5901c02c9fc71ff365))
|
|
191
|
+
* move [@model](https://github.com/model) params to root stack and fix ds logical id ([#8736](https://github.com/aws-amplify/amplify-cli/issues/8736)) ([df4408c](https://github.com/aws-amplify/amplify-cli/commit/df4408c4080949ddd638778df9ae20e763dd5824))
|
|
192
|
+
* override none,DDB,lambda datasource logical IDs ([#8723](https://github.com/aws-amplify/amplify-cli/issues/8723)) ([c534dc4](https://github.com/aws-amplify/amplify-cli/commit/c534dc46704cf2a1264e98d8af9b7a199c1419eb))
|
|
193
|
+
* passing ddb params from root to nested model stacks ([#8766](https://github.com/aws-amplify/amplify-cli/issues/8766)) ([a98dc32](https://github.com/aws-amplify/amplify-cli/commit/a98dc32dda586a1f4844f3bc4e138142bb2405de))
|
|
34
194
|
|
|
35
195
|
|
|
36
196
|
### Features
|
|
37
197
|
|
|
38
|
-
*
|
|
39
|
-
|
|
198
|
+
* generate list types as non-null ([#8166](https://github.com/aws-amplify/amplify-cli/issues/8166)) ([93786c1](https://github.com/aws-amplify/amplify-cli/commit/93786c13ef04c72748ca32a1ef7878c0e6b5b129))
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
## [0.6.4](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.3...@aws-amplify/graphql-model-transformer@0.6.4) (2021-10-10)
|
|
205
|
+
|
|
206
|
+
**Note:** Version bump only for package @aws-amplify/graphql-model-transformer
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## [0.6.3](https://github.com/aws-amplify/amplify-cli/compare/@aws-amplify/graphql-model-transformer@0.6.2...@aws-amplify/graphql-model-transformer@0.6.3) (2021-09-27)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
### Bug Fixes
|
|
216
|
+
|
|
217
|
+
* **graphql-model-transformer:** [@model](https://github.com/model) conflict resolution ([#8035](https://github.com/aws-amplify/amplify-cli/issues/8035)) ([f3bdc4a](https://github.com/aws-amplify/amplify-cli/commit/f3bdc4ac1fcf596f634d9d2e968785e76f7b138c))
|
|
218
|
+
* **graphql-model-transformer:** iam role name does not exceed 64 characters ([#8244](https://github.com/aws-amplify/amplify-cli/issues/8244)) ([812a671](https://github.com/aws-amplify/amplify-cli/commit/812a67163d6dd33160bf7ace9afd538c83a7af1a))
|
|
219
|
+
* **graphql-model-transformer:** remove unnecessary warnings for resolver config per type ([#8265](https://github.com/aws-amplify/amplify-cli/issues/8265)) ([2f2f0a5](https://github.com/aws-amplify/amplify-cli/commit/2f2f0a5bea59278219c1f4ebb5276927dc5a0fbd))
|
|
40
220
|
|
|
41
221
|
|
|
42
222
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SyncConfig, TransformerModelBase } from '@aws-amplify/graphql-transformer-core';
|
|
2
|
-
import { AppSyncDataSourceType, DataSourceInstance, MutationFieldType, QueryFieldType, SubscriptionFieldType, TransformerContextProvider, TransformerModelProvider, TransformerPrepareStepContextProvider, TransformerResolverProvider, TransformerSchemaVisitStepContextProvider, TransformerTransformSchemaStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
|
2
|
+
import { AppSyncDataSourceType, DataSourceInstance, MutationFieldType, QueryFieldType, SubscriptionFieldType, TransformerContextProvider, TransformerModelProvider, TransformerPrepareStepContextProvider, TransformerResolverProvider, TransformerSchemaVisitStepContextProvider, TransformerTransformSchemaStepContextProvider, TransformerBeforeStepContextProvider } from '@aws-amplify/graphql-transformer-interfaces';
|
|
3
3
|
import { DirectiveNode, InputValueDefinitionNode, ObjectTypeDefinitionNode } from 'graphql';
|
|
4
4
|
export declare type Nullable<T> = T | null;
|
|
5
5
|
export declare type OptionalAndNullable<T> = Partial<T>;
|
|
@@ -43,33 +43,37 @@ export declare class ModelTransformer extends TransformerModelBase implements Tr
|
|
|
43
43
|
private typesWithModelDirective;
|
|
44
44
|
private modelDirectiveConfig;
|
|
45
45
|
constructor(options?: ModelTransformerOptions);
|
|
46
|
+
before: (ctx: TransformerBeforeStepContextProvider) => void;
|
|
46
47
|
object: (definition: ObjectTypeDefinitionNode, directive: DirectiveNode, ctx: TransformerSchemaVisitStepContextProvider) => void;
|
|
47
48
|
validate: () => void;
|
|
48
49
|
prepare: (context: TransformerPrepareStepContextProvider) => void;
|
|
49
50
|
transformSchema: (ctx: TransformerTransformSchemaStepContextProvider) => void;
|
|
50
51
|
generateResolvers: (context: TransformerContextProvider) => void;
|
|
51
|
-
generateGetResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
52
|
-
generateListResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
53
|
-
generateUpdateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
54
|
-
generateDeleteResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
55
|
-
generateOnCreateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
56
|
-
generateOnUpdateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
57
|
-
generateOnDeleteResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
58
|
-
generateSyncResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
52
|
+
generateGetResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
53
|
+
generateListResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
54
|
+
generateUpdateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
55
|
+
generateDeleteResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
56
|
+
generateOnCreateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
57
|
+
generateOnUpdateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
58
|
+
generateOnDeleteResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
59
|
+
generateSyncResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
59
60
|
getQueryFieldNames: (ctx: TransformerTransformSchemaStepContextProvider, type: ObjectTypeDefinitionNode) => Set<{
|
|
60
61
|
fieldName: string;
|
|
61
62
|
typeName: string;
|
|
62
63
|
type: QueryFieldType;
|
|
64
|
+
resolverLogicalId: string;
|
|
63
65
|
}>;
|
|
64
66
|
getMutationFieldNames: (ctx: TransformerTransformSchemaStepContextProvider, type: ObjectTypeDefinitionNode) => Set<{
|
|
65
67
|
fieldName: string;
|
|
66
68
|
typeName: string;
|
|
67
69
|
type: MutationFieldType;
|
|
70
|
+
resolverLogicalId: string;
|
|
68
71
|
}>;
|
|
69
72
|
getMutationName: (subscriptionType: SubscriptionFieldType, mutationMap: Set<{
|
|
70
73
|
fieldName: string;
|
|
71
74
|
typeName: string;
|
|
72
75
|
type: MutationFieldType;
|
|
76
|
+
resolverLogicalId: string;
|
|
73
77
|
}>) => string;
|
|
74
78
|
private createQueryFields;
|
|
75
79
|
private createMutationFields;
|
|
@@ -78,10 +82,11 @@ export declare class ModelTransformer extends TransformerModelBase implements Tr
|
|
|
78
82
|
fieldName: string;
|
|
79
83
|
typeName: string;
|
|
80
84
|
type: SubscriptionFieldType;
|
|
85
|
+
resolverLogicalId: string;
|
|
81
86
|
}>;
|
|
82
87
|
getDataSourceResource: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode) => DataSourceInstance;
|
|
83
88
|
getDataSourceType: () => AppSyncDataSourceType;
|
|
84
|
-
generateCreateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string) => TransformerResolverProvider;
|
|
89
|
+
generateCreateResolver: (ctx: TransformerContextProvider, type: ObjectTypeDefinitionNode, typeName: string, fieldName: string, resolverLogicalId: string) => TransformerResolverProvider;
|
|
85
90
|
getInputs: (ctx: TransformerTransformSchemaStepContextProvider, type: ObjectTypeDefinitionNode, operation: {
|
|
86
91
|
fieldName: string;
|
|
87
92
|
typeName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-model-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-model-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-model-transformer.d.ts","sourceRoot":"","sources":["../src/graphql-model-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EAEV,oBAAoB,EAErB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAElB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,qCAAqC,EACrC,2BAA2B,EAC3B,yCAAyC,EACzC,6CAA6C,EAE7C,oCAAoC,EACrC,MAAM,6CAA6C,CAAC;AAKrD,OAAO,EACL,aAAa,EAGb,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAoDjB,oBAAY,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACnC,oBAAY,mBAAmB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;AAEhD,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,EAAE,OAAO;CACV;AACD,oBAAY,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,mBAAmB,CAAC;QAC5B,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;KACnC,CAAC,CAAC;IACH,SAAS,EAAE,mBAAmB,CAAC;QAC7B,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACpC,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACpC,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;KACrC,CAAC,CAAC;IACH,aAA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