@contember/client-content 2.1.0-alpha.9 → 2.1.0-beta.1

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.
Files changed (106) hide show
  1. package/CLAUDE.md +52 -0
  2. package/dist/development/src/ContentClient.cjs +12 -0
  3. package/dist/development/src/ContentClient.cjs.map +1 -1
  4. package/dist/development/src/ContentClient.js +12 -0
  5. package/dist/development/src/ContentClient.js.map +1 -1
  6. package/dist/development/src/ContentQueryBuilder.cjs +26 -15
  7. package/dist/development/src/ContentQueryBuilder.cjs.map +1 -1
  8. package/dist/development/src/ContentQueryBuilder.js +26 -15
  9. package/dist/development/src/ContentQueryBuilder.js.map +1 -1
  10. package/dist/development/src/MutationFailedError.cjs +11 -0
  11. package/dist/development/src/MutationFailedError.cjs.map +1 -0
  12. package/dist/development/src/MutationFailedError.js +11 -0
  13. package/dist/development/src/MutationFailedError.js.map +1 -0
  14. package/dist/development/src/nodes/ContentEntitySelection.cjs +47 -12
  15. package/dist/development/src/nodes/ContentEntitySelection.cjs.map +1 -1
  16. package/dist/development/src/nodes/ContentEntitySelection.js +47 -12
  17. package/dist/development/src/nodes/ContentEntitySelection.js.map +1 -1
  18. package/dist/development/src/nodes/ContentOperation.cjs.map +1 -1
  19. package/dist/development/src/nodes/ContentOperation.js.map +1 -1
  20. package/dist/development/src/utils/ContentOperationSet.cjs.map +1 -1
  21. package/dist/development/src/utils/ContentOperationSet.js.map +1 -1
  22. package/dist/development/src/utils/createListArgs.cjs.map +1 -1
  23. package/dist/development/src/utils/createListArgs.js.map +1 -1
  24. package/dist/development/src/utils/createMutationOperationSet.cjs +8 -6
  25. package/dist/development/src/utils/createMutationOperationSet.cjs.map +1 -1
  26. package/dist/development/src/utils/createMutationOperationSet.js +8 -6
  27. package/dist/development/src/utils/createMutationOperationSet.js.map +1 -1
  28. package/dist/development/src/utils/createQueryOperationSet.cjs.map +1 -1
  29. package/dist/development/src/utils/createQueryOperationSet.js.map +1 -1
  30. package/dist/development/src/utils/createTypedArgs.cjs.map +1 -1
  31. package/dist/development/src/utils/createTypedArgs.js.map +1 -1
  32. package/dist/development/src/utils/mutationFragments.cjs.map +1 -1
  33. package/dist/development/src/utils/mutationFragments.js.map +1 -1
  34. package/dist/production/src/ContentClient.cjs +12 -0
  35. package/dist/production/src/ContentClient.cjs.map +1 -1
  36. package/dist/production/src/ContentClient.js +12 -0
  37. package/dist/production/src/ContentClient.js.map +1 -1
  38. package/dist/production/src/ContentQueryBuilder.cjs +26 -15
  39. package/dist/production/src/ContentQueryBuilder.cjs.map +1 -1
  40. package/dist/production/src/ContentQueryBuilder.js +26 -15
  41. package/dist/production/src/ContentQueryBuilder.js.map +1 -1
  42. package/dist/production/src/MutationFailedError.cjs +11 -0
  43. package/dist/production/src/MutationFailedError.cjs.map +1 -0
  44. package/dist/production/src/MutationFailedError.js +11 -0
  45. package/dist/production/src/MutationFailedError.js.map +1 -0
  46. package/dist/production/src/nodes/ContentEntitySelection.cjs +47 -12
  47. package/dist/production/src/nodes/ContentEntitySelection.cjs.map +1 -1
  48. package/dist/production/src/nodes/ContentEntitySelection.js +47 -12
  49. package/dist/production/src/nodes/ContentEntitySelection.js.map +1 -1
  50. package/dist/production/src/nodes/ContentOperation.cjs.map +1 -1
  51. package/dist/production/src/nodes/ContentOperation.js.map +1 -1
  52. package/dist/production/src/utils/ContentOperationSet.cjs.map +1 -1
  53. package/dist/production/src/utils/ContentOperationSet.js.map +1 -1
  54. package/dist/production/src/utils/createListArgs.cjs.map +1 -1
  55. package/dist/production/src/utils/createListArgs.js.map +1 -1
  56. package/dist/production/src/utils/createMutationOperationSet.cjs +8 -6
  57. package/dist/production/src/utils/createMutationOperationSet.cjs.map +1 -1
  58. package/dist/production/src/utils/createMutationOperationSet.js +8 -6
  59. package/dist/production/src/utils/createMutationOperationSet.js.map +1 -1
  60. package/dist/production/src/utils/createQueryOperationSet.cjs.map +1 -1
  61. package/dist/production/src/utils/createQueryOperationSet.js.map +1 -1
  62. package/dist/production/src/utils/createTypedArgs.cjs.map +1 -1
  63. package/dist/production/src/utils/createTypedArgs.js.map +1 -1
  64. package/dist/production/src/utils/mutationFragments.cjs.map +1 -1
  65. package/dist/production/src/utils/mutationFragments.js.map +1 -1
  66. package/dist/types/ContentClient.d.ts +10 -0
  67. package/dist/types/ContentClient.d.ts.map +1 -1
  68. package/dist/types/ContentQueryBuilder.d.ts.map +1 -1
  69. package/dist/types/MutationFailedError.d.ts +13 -0
  70. package/dist/types/MutationFailedError.d.ts.map +1 -0
  71. package/dist/types/TypedContentQueryBuilder.d.ts.map +1 -1
  72. package/dist/types/nodes/ContentEntitySelection.d.ts +4 -1
  73. package/dist/types/nodes/ContentEntitySelection.d.ts.map +1 -1
  74. package/dist/types/nodes/TypedEntitySelection.d.ts +1 -0
  75. package/dist/types/nodes/TypedEntitySelection.d.ts.map +1 -1
  76. package/dist/types/tsconfig.tsbuildinfo +1 -1
  77. package/dist/types/types/Input.d.ts.map +1 -1
  78. package/dist/types/types/Result.d.ts +30 -9
  79. package/dist/types/types/Result.d.ts.map +1 -1
  80. package/dist/types/utils/createListArgs.d.ts.map +1 -1
  81. package/dist/types/utils/createMutationOperationSet.d.ts.map +1 -1
  82. package/dist/types/utils/createQueryOperationSet.d.ts.map +1 -1
  83. package/package.json +6 -6
  84. package/src/ContentClient.ts +36 -9
  85. package/src/ContentQueryBuilder.ts +45 -35
  86. package/src/MutationFailedError.ts +19 -0
  87. package/src/TypedContentQueryBuilder.ts +0 -4
  88. package/src/nodes/ContentEntitySelection.ts +67 -23
  89. package/src/nodes/TypedEntitySelection.ts +96 -48
  90. package/src/types/Input.ts +1 -9
  91. package/src/types/Result.ts +41 -9
  92. package/src/types/Schema.ts +0 -1
  93. package/src/utils/createListArgs.ts +5 -1
  94. package/src/utils/createMutationOperationSet.ts +9 -7
  95. package/src/utils/createQueryOperationSet.ts +0 -1
  96. package/tests/cases/unit/__snapshots__/mutation.test.ts.snap +952 -818
  97. package/tests/cases/unit/__snapshots__/query.test.ts.snap +216 -60
  98. package/tests/cases/unit/mutation.test.ts +48 -3
  99. package/tests/cases/unit/query.test.ts +103 -82
  100. package/tests/cases/unit/types.test.ts +31 -27
  101. package/tests/client/entities.ts +2 -0
  102. package/tests/client/enums.ts +5 -0
  103. package/tests/client/names.ts +129 -117
  104. package/tests/generate.ts +0 -1
  105. package/tests/lib.ts +0 -1
  106. package/tests/schema.ts +1 -2
@@ -1,116 +1,126 @@
1
- // Bun Snapshot v1, https://goo.gl/fbAQLP
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
2
 
3
3
  exports[`mutations in trx create trx 1`] = `
4
4
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!) {
5
- \tmut: transaction(options: $MutationTransactionOptions_0) {
6
- \t\tok
7
- \t\terrorMessage
8
- \t\terrors {
9
- \t\t\t... MutationError
10
- \t\t}
11
- \t\tvalidation {
12
- \t\t\t... ValidationResult
13
- \t\t}
14
- \t\tmut: createAuthor(data: $AuthorCreateInput_1) {
15
- \t\t\tok
16
- \t\t\terrorMessage
17
- \t\t\terrors {
18
- \t\t\t\t... MutationError
19
- \t\t\t}
20
- \t\t\tvalidation {
21
- \t\t\t\t... ValidationResult
22
- \t\t\t}
23
- \t\t}
24
- \t}
5
+ mut: transaction(options: $MutationTransactionOptions_0) {
6
+ ok
7
+ errorMessage
8
+ errors {
9
+ ... MutationError
10
+ }
11
+ validation {
12
+ ... ValidationResult
13
+ }
14
+ mut: createAuthor(data: $AuthorCreateInput_1) {
15
+ ok
16
+ errorMessage
17
+ errors {
18
+ ... MutationError
19
+ }
20
+ validation {
21
+ ... ValidationResult
22
+ }
23
+ }
24
+ }
25
25
  }
26
26
  fragment MutationError on _MutationError {
27
- \tpaths {
28
- \t\t... on _FieldPathFragment {
29
- \t\t\tfield
30
- \t\t}
31
- \t\t... on _IndexPathFragment {
32
- \t\t\tindex
33
- \t\t\talias
34
- \t\t}
35
- \t}
36
- \tmessage
37
- \ttype
27
+ paths {
28
+ ... on _FieldPathFragment {
29
+ field
30
+ }
31
+ ... on _IndexPathFragment {
32
+ index
33
+ alias
34
+ }
35
+ }
36
+ message
37
+ type
38
38
  }
39
39
  fragment ValidationResult on _ValidationResult {
40
- \tvalid
41
- \terrors {
42
- \t\tpath {
43
- \t\t\t... on _FieldPathFragment {
44
- \t\t\t\tfield
45
- \t\t\t}
46
- \t\t\t... on _IndexPathFragment {
47
- \t\t\t\tindex
48
- \t\t\t\talias
49
- \t\t\t}
50
- \t\t}
51
- \t\tmessage {
52
- \t\t\ttext
53
- \t\t}
54
- \t}
40
+ valid
41
+ errors {
42
+ path {
43
+ ... on _FieldPathFragment {
44
+ field
45
+ }
46
+ ... on _IndexPathFragment {
47
+ index
48
+ alias
49
+ }
50
+ }
51
+ message {
52
+ text
53
+ }
54
+ }
55
55
  }
56
56
  "
57
57
  `;
58
58
 
59
+ exports[`mutations in trx create trx 2`] = `
60
+ {
61
+ "AuthorCreateInput_1": {
62
+ "email": "xx@localhost",
63
+ "name": "John",
64
+ },
65
+ "MutationTransactionOptions_0": {},
66
+ }
67
+ `;
68
+
59
69
  exports[`mutations in trx mutation with a node 1`] = `
60
70
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!) {
61
- \tmut: transaction(options: $MutationTransactionOptions_0) {
62
- \t\tok
63
- \t\terrorMessage
64
- \t\terrors {
65
- \t\t\t... MutationError
66
- \t\t}
67
- \t\tvalidation {
68
- \t\t\t... ValidationResult
69
- \t\t}
70
- \t\tmut: createAuthor(data: $AuthorCreateInput_1) {
71
- \t\t\tok
72
- \t\t\terrorMessage
73
- \t\t\terrors {
74
- \t\t\t\t... MutationError
75
- \t\t\t}
76
- \t\t\tvalidation {
77
- \t\t\t\t... ValidationResult
78
- \t\t\t}
79
- \t\t\tnode {
80
- \t\t\t\tid
81
- \t\t\t}
82
- \t\t}
83
- \t}
71
+ mut: transaction(options: $MutationTransactionOptions_0) {
72
+ ok
73
+ errorMessage
74
+ errors {
75
+ ... MutationError
76
+ }
77
+ validation {
78
+ ... ValidationResult
79
+ }
80
+ mut: createAuthor(data: $AuthorCreateInput_1) {
81
+ ok
82
+ errorMessage
83
+ errors {
84
+ ... MutationError
85
+ }
86
+ validation {
87
+ ... ValidationResult
88
+ }
89
+ node {
90
+ id
91
+ }
92
+ }
93
+ }
84
94
  }
85
95
  fragment MutationError on _MutationError {
86
- \tpaths {
87
- \t\t... on _FieldPathFragment {
88
- \t\t\tfield
89
- \t\t}
90
- \t\t... on _IndexPathFragment {
91
- \t\t\tindex
92
- \t\t\talias
93
- \t\t}
94
- \t}
95
- \tmessage
96
- \ttype
96
+ paths {
97
+ ... on _FieldPathFragment {
98
+ field
99
+ }
100
+ ... on _IndexPathFragment {
101
+ index
102
+ alias
103
+ }
104
+ }
105
+ message
106
+ type
97
107
  }
98
108
  fragment ValidationResult on _ValidationResult {
99
- \tvalid
100
- \terrors {
101
- \t\tpath {
102
- \t\t\t... on _FieldPathFragment {
103
- \t\t\t\tfield
104
- \t\t\t}
105
- \t\t\t... on _IndexPathFragment {
106
- \t\t\t\tindex
107
- \t\t\t\talias
108
- \t\t\t}
109
- \t\t}
110
- \t\tmessage {
111
- \t\t\ttext
112
- \t\t}
113
- \t}
109
+ valid
110
+ errors {
111
+ path {
112
+ ... on _FieldPathFragment {
113
+ field
114
+ }
115
+ ... on _IndexPathFragment {
116
+ index
117
+ alias
118
+ }
119
+ }
120
+ message {
121
+ text
122
+ }
123
+ }
114
124
  }
115
125
  "
116
126
  `;
@@ -127,56 +137,56 @@ exports[`mutations in trx mutation with a node 2`] = `
127
137
 
128
138
  exports[`mutations in trx update 1`] = `
129
139
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorUniqueWhere_1: AuthorUniqueWhere!, $AuthorUpdateInput_2: AuthorUpdateInput!) {
130
- \tmut: transaction(options: $MutationTransactionOptions_0) {
131
- \t\tok
132
- \t\terrorMessage
133
- \t\terrors {
134
- \t\t\t... MutationError
135
- \t\t}
136
- \t\tvalidation {
137
- \t\t\t... ValidationResult
138
- \t\t}
139
- \t\tmut: updateAuthor(by: $AuthorUniqueWhere_1, data: $AuthorUpdateInput_2) {
140
- \t\t\tok
141
- \t\t\terrorMessage
142
- \t\t\terrors {
143
- \t\t\t\t... MutationError
144
- \t\t\t}
145
- \t\t\tvalidation {
146
- \t\t\t\t... ValidationResult
147
- \t\t\t}
148
- \t\t}
149
- \t}
140
+ mut: transaction(options: $MutationTransactionOptions_0) {
141
+ ok
142
+ errorMessage
143
+ errors {
144
+ ... MutationError
145
+ }
146
+ validation {
147
+ ... ValidationResult
148
+ }
149
+ mut: updateAuthor(by: $AuthorUniqueWhere_1, data: $AuthorUpdateInput_2) {
150
+ ok
151
+ errorMessage
152
+ errors {
153
+ ... MutationError
154
+ }
155
+ validation {
156
+ ... ValidationResult
157
+ }
158
+ }
159
+ }
150
160
  }
151
161
  fragment MutationError on _MutationError {
152
- \tpaths {
153
- \t\t... on _FieldPathFragment {
154
- \t\t\tfield
155
- \t\t}
156
- \t\t... on _IndexPathFragment {
157
- \t\t\tindex
158
- \t\t\talias
159
- \t\t}
160
- \t}
161
- \tmessage
162
- \ttype
162
+ paths {
163
+ ... on _FieldPathFragment {
164
+ field
165
+ }
166
+ ... on _IndexPathFragment {
167
+ index
168
+ alias
169
+ }
170
+ }
171
+ message
172
+ type
163
173
  }
164
174
  fragment ValidationResult on _ValidationResult {
165
- \tvalid
166
- \terrors {
167
- \t\tpath {
168
- \t\t\t... on _FieldPathFragment {
169
- \t\t\t\tfield
170
- \t\t\t}
171
- \t\t\t... on _IndexPathFragment {
172
- \t\t\t\tindex
173
- \t\t\t\talias
174
- \t\t\t}
175
- \t\t}
176
- \t\tmessage {
177
- \t\t\ttext
178
- \t\t}
179
- \t}
175
+ valid
176
+ errors {
177
+ path {
178
+ ... on _FieldPathFragment {
179
+ field
180
+ }
181
+ ... on _IndexPathFragment {
182
+ index
183
+ alias
184
+ }
185
+ }
186
+ message {
187
+ text
188
+ }
189
+ }
180
190
  }
181
191
  "
182
192
  `;
@@ -196,53 +206,53 @@ exports[`mutations in trx update 2`] = `
196
206
 
197
207
  exports[`mutations in trx delete 1`] = `
198
208
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorUniqueWhere_1: AuthorUniqueWhere!) {
199
- \tmut: transaction(options: $MutationTransactionOptions_0) {
200
- \t\tok
201
- \t\terrorMessage
202
- \t\terrors {
203
- \t\t\t... MutationError
204
- \t\t}
205
- \t\tvalidation {
206
- \t\t\t... ValidationResult
207
- \t\t}
208
- \t\tmut: deleteAuthor(by: $AuthorUniqueWhere_1) {
209
- \t\t\tok
210
- \t\t\terrorMessage
211
- \t\t\terrors {
212
- \t\t\t\t... MutationError
213
- \t\t\t}
214
- \t\t}
215
- \t}
209
+ mut: transaction(options: $MutationTransactionOptions_0) {
210
+ ok
211
+ errorMessage
212
+ errors {
213
+ ... MutationError
214
+ }
215
+ validation {
216
+ ... ValidationResult
217
+ }
218
+ mut: deleteAuthor(by: $AuthorUniqueWhere_1) {
219
+ ok
220
+ errorMessage
221
+ errors {
222
+ ... MutationError
223
+ }
224
+ }
225
+ }
216
226
  }
217
227
  fragment MutationError on _MutationError {
218
- \tpaths {
219
- \t\t... on _FieldPathFragment {
220
- \t\t\tfield
221
- \t\t}
222
- \t\t... on _IndexPathFragment {
223
- \t\t\tindex
224
- \t\t\talias
225
- \t\t}
226
- \t}
227
- \tmessage
228
- \ttype
228
+ paths {
229
+ ... on _FieldPathFragment {
230
+ field
231
+ }
232
+ ... on _IndexPathFragment {
233
+ index
234
+ alias
235
+ }
236
+ }
237
+ message
238
+ type
229
239
  }
230
240
  fragment ValidationResult on _ValidationResult {
231
- \tvalid
232
- \terrors {
233
- \t\tpath {
234
- \t\t\t... on _FieldPathFragment {
235
- \t\t\t\tfield
236
- \t\t\t}
237
- \t\t\t... on _IndexPathFragment {
238
- \t\t\t\tindex
239
- \t\t\t\talias
240
- \t\t\t}
241
- \t\t}
242
- \t\tmessage {
243
- \t\t\ttext
244
- \t\t}
245
- \t}
241
+ valid
242
+ errors {
243
+ path {
244
+ ... on _FieldPathFragment {
245
+ field
246
+ }
247
+ ... on _IndexPathFragment {
248
+ index
249
+ alias
250
+ }
251
+ }
252
+ message {
253
+ text
254
+ }
255
+ }
246
256
  }
247
257
  "
248
258
  `;
@@ -258,56 +268,56 @@ exports[`mutations in trx delete 2`] = `
258
268
 
259
269
  exports[`mutations in trx upsert 1`] = `
260
270
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorUniqueWhere_1: AuthorUniqueWhere!, $AuthorCreateInput_2: AuthorCreateInput!, $AuthorUpdateInput_3: AuthorUpdateInput!) {
261
- \tmut: transaction(options: $MutationTransactionOptions_0) {
262
- \t\tok
263
- \t\terrorMessage
264
- \t\terrors {
265
- \t\t\t... MutationError
266
- \t\t}
267
- \t\tvalidation {
268
- \t\t\t... ValidationResult
269
- \t\t}
270
- \t\tmut: upsertAuthor(by: $AuthorUniqueWhere_1, create: $AuthorCreateInput_2, update: $AuthorUpdateInput_3) {
271
- \t\t\tok
272
- \t\t\terrorMessage
273
- \t\t\terrors {
274
- \t\t\t\t... MutationError
275
- \t\t\t}
276
- \t\t\tvalidation {
277
- \t\t\t\t... ValidationResult
278
- \t\t\t}
279
- \t\t}
280
- \t}
271
+ mut: transaction(options: $MutationTransactionOptions_0) {
272
+ ok
273
+ errorMessage
274
+ errors {
275
+ ... MutationError
276
+ }
277
+ validation {
278
+ ... ValidationResult
279
+ }
280
+ mut: upsertAuthor(by: $AuthorUniqueWhere_1, create: $AuthorCreateInput_2, update: $AuthorUpdateInput_3) {
281
+ ok
282
+ errorMessage
283
+ errors {
284
+ ... MutationError
285
+ }
286
+ validation {
287
+ ... ValidationResult
288
+ }
289
+ }
290
+ }
281
291
  }
282
292
  fragment MutationError on _MutationError {
283
- \tpaths {
284
- \t\t... on _FieldPathFragment {
285
- \t\t\tfield
286
- \t\t}
287
- \t\t... on _IndexPathFragment {
288
- \t\t\tindex
289
- \t\t\talias
290
- \t\t}
291
- \t}
292
- \tmessage
293
- \ttype
293
+ paths {
294
+ ... on _FieldPathFragment {
295
+ field
296
+ }
297
+ ... on _IndexPathFragment {
298
+ index
299
+ alias
300
+ }
301
+ }
302
+ message
303
+ type
294
304
  }
295
305
  fragment ValidationResult on _ValidationResult {
296
- \tvalid
297
- \terrors {
298
- \t\tpath {
299
- \t\t\t... on _FieldPathFragment {
300
- \t\t\t\tfield
301
- \t\t\t}
302
- \t\t\t... on _IndexPathFragment {
303
- \t\t\t\tindex
304
- \t\t\t\talias
305
- \t\t\t}
306
- \t\t}
307
- \t\tmessage {
308
- \t\t\ttext
309
- \t\t}
310
- \t}
306
+ valid
307
+ errors {
308
+ path {
309
+ ... on _FieldPathFragment {
310
+ field
311
+ }
312
+ ... on _IndexPathFragment {
313
+ index
314
+ alias
315
+ }
316
+ }
317
+ message {
318
+ text
319
+ }
320
+ }
311
321
  }
312
322
  "
313
323
  `;
@@ -331,83 +341,83 @@ exports[`mutations in trx upsert 2`] = `
331
341
 
332
342
  exports[`mutations in trx multiple mutations as array 1`] = `
333
343
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!, $AuthorCreateInput_2: AuthorCreateInput!) {
334
- \tmut: transaction(options: $MutationTransactionOptions_0) {
335
- \t\tok
336
- \t\terrorMessage
337
- \t\terrors {
338
- \t\t\t... MutationError
339
- \t\t}
340
- \t\tvalidation {
341
- \t\t\t... ValidationResult
342
- \t\t}
343
- \t\tmut_0: createAuthor(data: $AuthorCreateInput_1) {
344
- \t\t\tok
345
- \t\t\terrorMessage
346
- \t\t\terrors {
347
- \t\t\t\t... MutationError
348
- \t\t\t}
349
- \t\t\tvalidation {
350
- \t\t\t\t... ValidationResult
351
- \t\t\t}
352
- \t\t}
353
- \t\tmut_1: createAuthor(data: $AuthorCreateInput_2) {
354
- \t\t\tok
355
- \t\t\terrorMessage
356
- \t\t\terrors {
357
- \t\t\t\t... MutationError
358
- \t\t\t}
359
- \t\t\tvalidation {
360
- \t\t\t\t... ValidationResult
361
- \t\t\t}
362
- \t\t}
363
- \t}
344
+ mut: transaction(options: $MutationTransactionOptions_0) {
345
+ ok
346
+ errorMessage
347
+ errors {
348
+ ... MutationError
349
+ }
350
+ validation {
351
+ ... ValidationResult
352
+ }
353
+ mut_0: createAuthor(data: $AuthorCreateInput_1) {
354
+ ok
355
+ errorMessage
356
+ errors {
357
+ ... MutationError
358
+ }
359
+ validation {
360
+ ... ValidationResult
361
+ }
362
+ }
363
+ mut_1: createAuthor(data: $AuthorCreateInput_2) {
364
+ ok
365
+ errorMessage
366
+ errors {
367
+ ... MutationError
368
+ }
369
+ validation {
370
+ ... ValidationResult
371
+ }
372
+ }
373
+ }
364
374
  }
365
375
  fragment MutationError on _MutationError {
366
- \tpaths {
367
- \t\t... on _FieldPathFragment {
368
- \t\t\tfield
369
- \t\t}
370
- \t\t... on _IndexPathFragment {
371
- \t\t\tindex
372
- \t\t\talias
373
- \t\t}
374
- \t}
375
- \tmessage
376
- \ttype
376
+ paths {
377
+ ... on _FieldPathFragment {
378
+ field
379
+ }
380
+ ... on _IndexPathFragment {
381
+ index
382
+ alias
383
+ }
384
+ }
385
+ message
386
+ type
377
387
  }
378
388
  fragment ValidationResult on _ValidationResult {
379
- \tvalid
380
- \terrors {
381
- \t\tpath {
382
- \t\t\t... on _FieldPathFragment {
383
- \t\t\t\tfield
384
- \t\t\t}
385
- \t\t\t... on _IndexPathFragment {
386
- \t\t\t\tindex
387
- \t\t\t\talias
388
- \t\t\t}
389
- \t\t}
390
- \t\tmessage {
391
- \t\t\ttext
392
- \t\t}
393
- \t}
389
+ valid
390
+ errors {
391
+ path {
392
+ ... on _FieldPathFragment {
393
+ field
394
+ }
395
+ ... on _IndexPathFragment {
396
+ index
397
+ alias
398
+ }
399
+ }
400
+ message {
401
+ text
402
+ }
403
+ }
394
404
  }
395
405
  "
396
406
  `;
397
407
 
398
408
  exports[`mutations in trx multiple mutations as array:
399
- \t\t\t{
400
- \t\t\t "AuthorCreateInput_1": {
401
- \t\t\t "email": "xx@localhost",
402
- \t\t\t "name": "John",
403
- \t\t\t },
404
- \t\t\t "AuthorCreateInput_2": {
405
- \t\t\t "email": "xx@localhost",
406
- \t\t\t "name": "John",
407
- \t\t\t },
408
- \t\t\t "MutationTransactionOptions_0": {},
409
- \t\t\t}
410
- \t\t 1`] = `
409
+ {
410
+ "AuthorCreateInput_1": {
411
+ "email": "xx@localhost",
412
+ "name": "John",
413
+ },
414
+ "AuthorCreateInput_2": {
415
+ "email": "xx@localhost",
416
+ "name": "John",
417
+ },
418
+ "MutationTransactionOptions_0": {},
419
+ }
420
+ 1`] = `
411
421
  {
412
422
  "AuthorCreateInput_1": {
413
423
  "email": "xx@localhost",
@@ -422,147 +432,147 @@ exports[`mutations in trx multiple mutations as array:
422
432
  `;
423
433
 
424
434
  exports[`mutations in trx multiple named mutations trx:
425
- \t\t\t"mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!, $PostCreateInput_2: PostCreateInput!) {
426
- \t\t\t\tmut: transaction(options: $MutationTransactionOptions_0) {
427
- \t\t\t\t\tok
428
- \t\t\t\t\terrorMessage
429
- \t\t\t\t\terrors {
430
- \t\t\t\t\t\t... MutationError
431
- \t\t\t\t\t}
432
- \t\t\t\t\tvalidation {
433
- \t\t\t\t\t\t... ValidationResult
434
- \t\t\t\t\t}
435
- \t\t\t\t\tcreateAuthor(data: $AuthorCreateInput_1) {
436
- \t\t\t\t\t\tok
437
- \t\t\t\t\t\terrorMessage
438
- \t\t\t\t\t\terrors {
439
- \t\t\t\t\t\t\t... MutationError
440
- \t\t\t\t\t\t}
441
- \t\t\t\t\t\tvalidation {
442
- \t\t\t\t\t\t\t... ValidationResult
443
- \t\t\t\t\t\t}
444
- \t\t\t\t\t}
445
- \t\t\t\t\tcreatePost(data: $PostCreateInput_2) {
446
- \t\t\t\t\t\tok
447
- \t\t\t\t\t\terrorMessage
448
- \t\t\t\t\t\terrors {
449
- \t\t\t\t\t\t\t... MutationError
450
- \t\t\t\t\t\t}
451
- \t\t\t\t\t\tvalidation {
452
- \t\t\t\t\t\t\t... ValidationResult
453
- \t\t\t\t\t\t}
454
- \t\t\t\t\t}
455
- \t\t\t\t}
456
- \t\t\t}
457
- \t\t\tfragment MutationError on _MutationError {
458
- \t\t\t\tpaths {
459
- \t\t\t\t\t... on _FieldPathFragment {
460
- \t\t\t\t\t\tfield
461
- \t\t\t\t\t}
462
- \t\t\t\t\t... on _IndexPathFragment {
463
- \t\t\t\t\t\tindex
464
- \t\t\t\t\t\talias
465
- \t\t\t\t\t}
466
- \t\t\t\t}
467
- \t\t\t\tmessage
468
- \t\t\t\ttype
469
- \t\t\t}
470
- \t\t\tfragment ValidationResult on _ValidationResult {
471
- \t\t\t\tvalid
472
- \t\t\t\terrors {
473
- \t\t\t\t\tpath {
474
- \t\t\t\t\t\t... on _FieldPathFragment {
475
- \t\t\t\t\t\t\tfield
476
- \t\t\t\t\t\t}
477
- \t\t\t\t\t\t... on _IndexPathFragment {
478
- \t\t\t\t\t\t\tindex
479
- \t\t\t\t\t\t\talias
480
- \t\t\t\t\t\t}
481
- \t\t\t\t\t}
482
- \t\t\t\t\tmessage {
483
- \t\t\t\t\t\ttext
484
- \t\t\t\t\t}
485
- \t\t\t\t}
486
- \t\t\t}
487
- \t\t\t"
488
- \t\t 1`] = `
435
+ "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!, $PostCreateInput_2: PostCreateInput!) {
436
+ mut: transaction(options: $MutationTransactionOptions_0) {
437
+ ok
438
+ errorMessage
439
+ errors {
440
+ ... MutationError
441
+ }
442
+ validation {
443
+ ... ValidationResult
444
+ }
445
+ createAuthor(data: $AuthorCreateInput_1) {
446
+ ok
447
+ errorMessage
448
+ errors {
449
+ ... MutationError
450
+ }
451
+ validation {
452
+ ... ValidationResult
453
+ }
454
+ }
455
+ createPost(data: $PostCreateInput_2) {
456
+ ok
457
+ errorMessage
458
+ errors {
459
+ ... MutationError
460
+ }
461
+ validation {
462
+ ... ValidationResult
463
+ }
464
+ }
465
+ }
466
+ }
467
+ fragment MutationError on _MutationError {
468
+ paths {
469
+ ... on _FieldPathFragment {
470
+ field
471
+ }
472
+ ... on _IndexPathFragment {
473
+ index
474
+ alias
475
+ }
476
+ }
477
+ message
478
+ type
479
+ }
480
+ fragment ValidationResult on _ValidationResult {
481
+ valid
482
+ errors {
483
+ path {
484
+ ... on _FieldPathFragment {
485
+ field
486
+ }
487
+ ... on _IndexPathFragment {
488
+ index
489
+ alias
490
+ }
491
+ }
492
+ message {
493
+ text
494
+ }
495
+ }
496
+ }
497
+ "
498
+ 1`] = `
489
499
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!, $PostCreateInput_2: PostCreateInput!) {
490
- \tmut: transaction(options: $MutationTransactionOptions_0) {
491
- \t\tok
492
- \t\terrorMessage
493
- \t\terrors {
494
- \t\t\t... MutationError
495
- \t\t}
496
- \t\tvalidation {
497
- \t\t\t... ValidationResult
498
- \t\t}
499
- \t\tcreateAuthor(data: $AuthorCreateInput_1) {
500
- \t\t\tok
501
- \t\t\terrorMessage
502
- \t\t\terrors {
503
- \t\t\t\t... MutationError
504
- \t\t\t}
505
- \t\t\tvalidation {
506
- \t\t\t\t... ValidationResult
507
- \t\t\t}
508
- \t\t}
509
- \t\tcreatePost(data: $PostCreateInput_2) {
510
- \t\t\tok
511
- \t\t\terrorMessage
512
- \t\t\terrors {
513
- \t\t\t\t... MutationError
514
- \t\t\t}
515
- \t\t\tvalidation {
516
- \t\t\t\t... ValidationResult
517
- \t\t\t}
518
- \t\t}
519
- \t}
500
+ mut: transaction(options: $MutationTransactionOptions_0) {
501
+ ok
502
+ errorMessage
503
+ errors {
504
+ ... MutationError
505
+ }
506
+ validation {
507
+ ... ValidationResult
508
+ }
509
+ createAuthor(data: $AuthorCreateInput_1) {
510
+ ok
511
+ errorMessage
512
+ errors {
513
+ ... MutationError
514
+ }
515
+ validation {
516
+ ... ValidationResult
517
+ }
518
+ }
519
+ createPost(data: $PostCreateInput_2) {
520
+ ok
521
+ errorMessage
522
+ errors {
523
+ ... MutationError
524
+ }
525
+ validation {
526
+ ... ValidationResult
527
+ }
528
+ }
529
+ }
520
530
  }
521
531
  fragment MutationError on _MutationError {
522
- \tpaths {
523
- \t\t... on _FieldPathFragment {
524
- \t\t\tfield
525
- \t\t}
526
- \t\t... on _IndexPathFragment {
527
- \t\t\tindex
528
- \t\t\talias
529
- \t\t}
530
- \t}
531
- \tmessage
532
- \ttype
532
+ paths {
533
+ ... on _FieldPathFragment {
534
+ field
535
+ }
536
+ ... on _IndexPathFragment {
537
+ index
538
+ alias
539
+ }
540
+ }
541
+ message
542
+ type
533
543
  }
534
544
  fragment ValidationResult on _ValidationResult {
535
- \tvalid
536
- \terrors {
537
- \t\tpath {
538
- \t\t\t... on _FieldPathFragment {
539
- \t\t\t\tfield
540
- \t\t\t}
541
- \t\t\t... on _IndexPathFragment {
542
- \t\t\t\tindex
543
- \t\t\t\talias
544
- \t\t\t}
545
- \t\t}
546
- \t\tmessage {
547
- \t\t\ttext
548
- \t\t}
549
- \t}
545
+ valid
546
+ errors {
547
+ path {
548
+ ... on _FieldPathFragment {
549
+ field
550
+ }
551
+ ... on _IndexPathFragment {
552
+ index
553
+ alias
554
+ }
555
+ }
556
+ message {
557
+ text
558
+ }
559
+ }
550
560
  }
551
561
  "
552
562
  `;
553
563
 
554
564
  exports[`mutations in trx multiple named mutations trx:
555
- \t\t\t{
556
- \t\t\t "AuthorCreateInput_1": {
557
- \t\t\t "email": "xx@localhost",
558
- \t\t\t "name": "John",
559
- \t\t\t },
560
- \t\t\t "MutationTransactionOptions_0": {},
561
- \t\t\t "PostCreateInput_2": {
562
- \t\t\t "publishedAt": "now",
563
- \t\t\t },
564
- \t\t\t}
565
- \t\t 1`] = `
565
+ {
566
+ "AuthorCreateInput_1": {
567
+ "email": "xx@localhost",
568
+ "name": "John",
569
+ },
570
+ "MutationTransactionOptions_0": {},
571
+ "PostCreateInput_2": {
572
+ "publishedAt": "now",
573
+ },
574
+ }
575
+ 1`] = `
566
576
  {
567
577
  "AuthorCreateInput_1": {
568
578
  "email": "xx@localhost",
@@ -577,62 +587,63 @@ exports[`mutations in trx multiple named mutations trx:
577
587
 
578
588
  exports[`mutations in trx mutation and query combo trx 1`] = `
579
589
  "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $PostCreateInput_1: PostCreateInput!, $PostUniqueWhere_2: PostUniqueWhere!) {
580
- \tmut: transaction(options: $MutationTransactionOptions_0) {
581
- \t\tok
582
- \t\terrorMessage
583
- \t\terrors {
584
- \t\t\t... MutationError
585
- \t\t}
586
- \t\tvalidation {
587
- \t\t\t... ValidationResult
588
- \t\t}
589
- \t\tcreatePost(data: $PostCreateInput_1) {
590
- \t\t\tok
591
- \t\t\terrorMessage
592
- \t\t\terrors {
593
- \t\t\t\t... MutationError
594
- \t\t\t}
595
- \t\t\tvalidation {
596
- \t\t\t\t... ValidationResult
597
- \t\t\t}
598
- \t\t}
599
- \t\tpost: query {
600
- \t\t\tvalue: getPost(by: $PostUniqueWhere_2) {
601
- \t\t\t\tid
602
- \t\t\t\tpublishedAt
603
- \t\t\t}
604
- \t\t}
605
- \t}
590
+ mut: transaction(options: $MutationTransactionOptions_0) {
591
+ ok
592
+ errorMessage
593
+ errors {
594
+ ... MutationError
595
+ }
596
+ validation {
597
+ ... ValidationResult
598
+ }
599
+ createPost(data: $PostCreateInput_1) {
600
+ ok
601
+ errorMessage
602
+ errors {
603
+ ... MutationError
604
+ }
605
+ validation {
606
+ ... ValidationResult
607
+ }
608
+ }
609
+ post: query {
610
+ value: getPost(by: $PostUniqueWhere_2) {
611
+ id
612
+ publishedAt
613
+ status
614
+ }
615
+ }
616
+ }
606
617
  }
607
618
  fragment MutationError on _MutationError {
608
- \tpaths {
609
- \t\t... on _FieldPathFragment {
610
- \t\t\tfield
611
- \t\t}
612
- \t\t... on _IndexPathFragment {
613
- \t\t\tindex
614
- \t\t\talias
615
- \t\t}
616
- \t}
617
- \tmessage
618
- \ttype
619
+ paths {
620
+ ... on _FieldPathFragment {
621
+ field
622
+ }
623
+ ... on _IndexPathFragment {
624
+ index
625
+ alias
626
+ }
627
+ }
628
+ message
629
+ type
619
630
  }
620
631
  fragment ValidationResult on _ValidationResult {
621
- \tvalid
622
- \terrors {
623
- \t\tpath {
624
- \t\t\t... on _FieldPathFragment {
625
- \t\t\t\tfield
626
- \t\t\t}
627
- \t\t\t... on _IndexPathFragment {
628
- \t\t\t\tindex
629
- \t\t\t\talias
630
- \t\t\t}
631
- \t\t}
632
- \t\tmessage {
633
- \t\t\ttext
634
- \t\t}
635
- \t}
632
+ valid
633
+ errors {
634
+ path {
635
+ ... on _FieldPathFragment {
636
+ field
637
+ }
638
+ ... on _IndexPathFragment {
639
+ index
640
+ alias
641
+ }
642
+ }
643
+ message {
644
+ text
645
+ }
646
+ }
636
647
  }
637
648
  "
638
649
  `;
@@ -651,46 +662,46 @@ exports[`mutations in trx mutation and query combo trx 2`] = `
651
662
 
652
663
  exports[`mutations without trx create 1`] = `
653
664
  "mutation($AuthorCreateInput_0: AuthorCreateInput!) {
654
- \tmut: createAuthor(data: $AuthorCreateInput_0) {
655
- \t\tok
656
- \t\terrorMessage
657
- \t\terrors {
658
- \t\t\t... MutationError
659
- \t\t}
660
- \t\tvalidation {
661
- \t\t\t... ValidationResult
662
- \t\t}
663
- \t}
665
+ mut: createAuthor(data: $AuthorCreateInput_0) {
666
+ ok
667
+ errorMessage
668
+ errors {
669
+ ... MutationError
670
+ }
671
+ validation {
672
+ ... ValidationResult
673
+ }
674
+ }
664
675
  }
665
676
  fragment MutationError on _MutationError {
666
- \tpaths {
667
- \t\t... on _FieldPathFragment {
668
- \t\t\tfield
669
- \t\t}
670
- \t\t... on _IndexPathFragment {
671
- \t\t\tindex
672
- \t\t\talias
673
- \t\t}
674
- \t}
675
- \tmessage
676
- \ttype
677
+ paths {
678
+ ... on _FieldPathFragment {
679
+ field
680
+ }
681
+ ... on _IndexPathFragment {
682
+ index
683
+ alias
684
+ }
685
+ }
686
+ message
687
+ type
677
688
  }
678
689
  fragment ValidationResult on _ValidationResult {
679
- \tvalid
680
- \terrors {
681
- \t\tpath {
682
- \t\t\t... on _FieldPathFragment {
683
- \t\t\t\tfield
684
- \t\t\t}
685
- \t\t\t... on _IndexPathFragment {
686
- \t\t\t\tindex
687
- \t\t\t\talias
688
- \t\t\t}
689
- \t\t}
690
- \t\tmessage {
691
- \t\t\ttext
692
- \t\t}
693
- \t}
690
+ valid
691
+ errors {
692
+ path {
693
+ ... on _FieldPathFragment {
694
+ field
695
+ }
696
+ ... on _IndexPathFragment {
697
+ index
698
+ alias
699
+ }
700
+ }
701
+ message {
702
+ text
703
+ }
704
+ }
694
705
  }
695
706
  "
696
707
  `;
@@ -706,49 +717,49 @@ exports[`mutations without trx create 2`] = `
706
717
 
707
718
  exports[`mutations without trx mutation with a node 1`] = `
708
719
  "mutation($AuthorCreateInput_0: AuthorCreateInput!) {
709
- \tmut: createAuthor(data: $AuthorCreateInput_0) {
710
- \t\tok
711
- \t\terrorMessage
712
- \t\terrors {
713
- \t\t\t... MutationError
714
- \t\t}
715
- \t\tvalidation {
716
- \t\t\t... ValidationResult
717
- \t\t}
718
- \t\tnode {
719
- \t\t\tid
720
- \t\t}
721
- \t}
720
+ mut: createAuthor(data: $AuthorCreateInput_0) {
721
+ ok
722
+ errorMessage
723
+ errors {
724
+ ... MutationError
725
+ }
726
+ validation {
727
+ ... ValidationResult
728
+ }
729
+ node {
730
+ id
731
+ }
732
+ }
722
733
  }
723
734
  fragment MutationError on _MutationError {
724
- \tpaths {
725
- \t\t... on _FieldPathFragment {
726
- \t\t\tfield
727
- \t\t}
728
- \t\t... on _IndexPathFragment {
729
- \t\t\tindex
730
- \t\t\talias
731
- \t\t}
732
- \t}
733
- \tmessage
734
- \ttype
735
+ paths {
736
+ ... on _FieldPathFragment {
737
+ field
738
+ }
739
+ ... on _IndexPathFragment {
740
+ index
741
+ alias
742
+ }
743
+ }
744
+ message
745
+ type
735
746
  }
736
747
  fragment ValidationResult on _ValidationResult {
737
- \tvalid
738
- \terrors {
739
- \t\tpath {
740
- \t\t\t... on _FieldPathFragment {
741
- \t\t\t\tfield
742
- \t\t\t}
743
- \t\t\t... on _IndexPathFragment {
744
- \t\t\t\tindex
745
- \t\t\t\talias
746
- \t\t\t}
747
- \t\t}
748
- \t\tmessage {
749
- \t\t\ttext
750
- \t\t}
751
- \t}
748
+ valid
749
+ errors {
750
+ path {
751
+ ... on _FieldPathFragment {
752
+ field
753
+ }
754
+ ... on _IndexPathFragment {
755
+ index
756
+ alias
757
+ }
758
+ }
759
+ message {
760
+ text
761
+ }
762
+ }
752
763
  }
753
764
  "
754
765
  `;
@@ -764,46 +775,46 @@ exports[`mutations without trx mutation with a node 2`] = `
764
775
 
765
776
  exports[`mutations without trx update 1`] = `
766
777
  "mutation($AuthorUniqueWhere_0: AuthorUniqueWhere!, $AuthorUpdateInput_1: AuthorUpdateInput!) {
767
- \tmut: updateAuthor(by: $AuthorUniqueWhere_0, data: $AuthorUpdateInput_1) {
768
- \t\tok
769
- \t\terrorMessage
770
- \t\terrors {
771
- \t\t\t... MutationError
772
- \t\t}
773
- \t\tvalidation {
774
- \t\t\t... ValidationResult
775
- \t\t}
776
- \t}
778
+ mut: updateAuthor(by: $AuthorUniqueWhere_0, data: $AuthorUpdateInput_1) {
779
+ ok
780
+ errorMessage
781
+ errors {
782
+ ... MutationError
783
+ }
784
+ validation {
785
+ ... ValidationResult
786
+ }
787
+ }
777
788
  }
778
789
  fragment MutationError on _MutationError {
779
- \tpaths {
780
- \t\t... on _FieldPathFragment {
781
- \t\t\tfield
782
- \t\t}
783
- \t\t... on _IndexPathFragment {
784
- \t\t\tindex
785
- \t\t\talias
786
- \t\t}
787
- \t}
788
- \tmessage
789
- \ttype
790
+ paths {
791
+ ... on _FieldPathFragment {
792
+ field
793
+ }
794
+ ... on _IndexPathFragment {
795
+ index
796
+ alias
797
+ }
798
+ }
799
+ message
800
+ type
790
801
  }
791
802
  fragment ValidationResult on _ValidationResult {
792
- \tvalid
793
- \terrors {
794
- \t\tpath {
795
- \t\t\t... on _FieldPathFragment {
796
- \t\t\t\tfield
797
- \t\t\t}
798
- \t\t\t... on _IndexPathFragment {
799
- \t\t\t\tindex
800
- \t\t\t\talias
801
- \t\t\t}
802
- \t\t}
803
- \t\tmessage {
804
- \t\t\ttext
805
- \t\t}
806
- \t}
803
+ valid
804
+ errors {
805
+ path {
806
+ ... on _FieldPathFragment {
807
+ field
808
+ }
809
+ ... on _IndexPathFragment {
810
+ index
811
+ alias
812
+ }
813
+ }
814
+ message {
815
+ text
816
+ }
817
+ }
807
818
  }
808
819
  "
809
820
  `;
@@ -822,26 +833,26 @@ exports[`mutations without trx update 2`] = `
822
833
 
823
834
  exports[`mutations without trx delete 1`] = `
824
835
  "mutation($AuthorUniqueWhere_0: AuthorUniqueWhere!) {
825
- \tmut: deleteAuthor(by: $AuthorUniqueWhere_0) {
826
- \t\tok
827
- \t\terrorMessage
828
- \t\terrors {
829
- \t\t\t... MutationError
830
- \t\t}
831
- \t}
836
+ mut: deleteAuthor(by: $AuthorUniqueWhere_0) {
837
+ ok
838
+ errorMessage
839
+ errors {
840
+ ... MutationError
841
+ }
842
+ }
832
843
  }
833
844
  fragment MutationError on _MutationError {
834
- \tpaths {
835
- \t\t... on _FieldPathFragment {
836
- \t\t\tfield
837
- \t\t}
838
- \t\t... on _IndexPathFragment {
839
- \t\t\tindex
840
- \t\t\talias
841
- \t\t}
842
- \t}
843
- \tmessage
844
- \ttype
845
+ paths {
846
+ ... on _FieldPathFragment {
847
+ field
848
+ }
849
+ ... on _IndexPathFragment {
850
+ index
851
+ alias
852
+ }
853
+ }
854
+ message
855
+ type
845
856
  }
846
857
  "
847
858
  `;
@@ -856,46 +867,46 @@ exports[`mutations without trx delete 2`] = `
856
867
 
857
868
  exports[`mutations without trx upsert 1`] = `
858
869
  "mutation($AuthorUniqueWhere_0: AuthorUniqueWhere!, $AuthorCreateInput_1: AuthorCreateInput!, $AuthorUpdateInput_2: AuthorUpdateInput!) {
859
- \tmut: upsertAuthor(by: $AuthorUniqueWhere_0, create: $AuthorCreateInput_1, update: $AuthorUpdateInput_2) {
860
- \t\tok
861
- \t\terrorMessage
862
- \t\terrors {
863
- \t\t\t... MutationError
864
- \t\t}
865
- \t\tvalidation {
866
- \t\t\t... ValidationResult
867
- \t\t}
868
- \t}
870
+ mut: upsertAuthor(by: $AuthorUniqueWhere_0, create: $AuthorCreateInput_1, update: $AuthorUpdateInput_2) {
871
+ ok
872
+ errorMessage
873
+ errors {
874
+ ... MutationError
875
+ }
876
+ validation {
877
+ ... ValidationResult
878
+ }
879
+ }
869
880
  }
870
881
  fragment MutationError on _MutationError {
871
- \tpaths {
872
- \t\t... on _FieldPathFragment {
873
- \t\t\tfield
874
- \t\t}
875
- \t\t... on _IndexPathFragment {
876
- \t\t\tindex
877
- \t\t\talias
878
- \t\t}
879
- \t}
880
- \tmessage
881
- \ttype
882
+ paths {
883
+ ... on _FieldPathFragment {
884
+ field
885
+ }
886
+ ... on _IndexPathFragment {
887
+ index
888
+ alias
889
+ }
890
+ }
891
+ message
892
+ type
882
893
  }
883
894
  fragment ValidationResult on _ValidationResult {
884
- \tvalid
885
- \terrors {
886
- \t\tpath {
887
- \t\t\t... on _FieldPathFragment {
888
- \t\t\t\tfield
889
- \t\t\t}
890
- \t\t\t... on _IndexPathFragment {
891
- \t\t\t\tindex
892
- \t\t\t\talias
893
- \t\t\t}
894
- \t\t}
895
- \t\tmessage {
896
- \t\t\ttext
897
- \t\t}
898
- \t}
895
+ valid
896
+ errors {
897
+ path {
898
+ ... on _FieldPathFragment {
899
+ field
900
+ }
901
+ ... on _IndexPathFragment {
902
+ index
903
+ alias
904
+ }
905
+ }
906
+ message {
907
+ text
908
+ }
909
+ }
899
910
  }
900
911
  "
901
912
  `;
@@ -918,56 +929,56 @@ exports[`mutations without trx upsert 2`] = `
918
929
 
919
930
  exports[`mutations without trx multiple mutations as array 1`] = `
920
931
  "mutation($AuthorCreateInput_0: AuthorCreateInput!, $AuthorCreateInput_1: AuthorCreateInput!) {
921
- \tmut_0: createAuthor(data: $AuthorCreateInput_0) {
922
- \t\tok
923
- \t\terrorMessage
924
- \t\terrors {
925
- \t\t\t... MutationError
926
- \t\t}
927
- \t\tvalidation {
928
- \t\t\t... ValidationResult
929
- \t\t}
930
- \t}
931
- \tmut_1: createAuthor(data: $AuthorCreateInput_1) {
932
- \t\tok
933
- \t\terrorMessage
934
- \t\terrors {
935
- \t\t\t... MutationError
936
- \t\t}
937
- \t\tvalidation {
938
- \t\t\t... ValidationResult
939
- \t\t}
940
- \t}
932
+ mut_0: createAuthor(data: $AuthorCreateInput_0) {
933
+ ok
934
+ errorMessage
935
+ errors {
936
+ ... MutationError
937
+ }
938
+ validation {
939
+ ... ValidationResult
940
+ }
941
+ }
942
+ mut_1: createAuthor(data: $AuthorCreateInput_1) {
943
+ ok
944
+ errorMessage
945
+ errors {
946
+ ... MutationError
947
+ }
948
+ validation {
949
+ ... ValidationResult
950
+ }
951
+ }
941
952
  }
942
953
  fragment MutationError on _MutationError {
943
- \tpaths {
944
- \t\t... on _FieldPathFragment {
945
- \t\t\tfield
946
- \t\t}
947
- \t\t... on _IndexPathFragment {
948
- \t\t\tindex
949
- \t\t\talias
950
- \t\t}
951
- \t}
952
- \tmessage
953
- \ttype
954
+ paths {
955
+ ... on _FieldPathFragment {
956
+ field
957
+ }
958
+ ... on _IndexPathFragment {
959
+ index
960
+ alias
961
+ }
962
+ }
963
+ message
964
+ type
954
965
  }
955
966
  fragment ValidationResult on _ValidationResult {
956
- \tvalid
957
- \terrors {
958
- \t\tpath {
959
- \t\t\t... on _FieldPathFragment {
960
- \t\t\t\tfield
961
- \t\t\t}
962
- \t\t\t... on _IndexPathFragment {
963
- \t\t\t\tindex
964
- \t\t\t\talias
965
- \t\t\t}
966
- \t\t}
967
- \t\tmessage {
968
- \t\t\ttext
969
- \t\t}
970
- \t}
967
+ valid
968
+ errors {
969
+ path {
970
+ ... on _FieldPathFragment {
971
+ field
972
+ }
973
+ ... on _IndexPathFragment {
974
+ index
975
+ alias
976
+ }
977
+ }
978
+ message {
979
+ text
980
+ }
981
+ }
971
982
  }
972
983
  "
973
984
  `;
@@ -987,56 +998,56 @@ exports[`mutations without trx multiple mutations as array 2`] = `
987
998
 
988
999
  exports[`mutations without trx multiple named mutations 1`] = `
989
1000
  "mutation($AuthorCreateInput_0: AuthorCreateInput!, $PostCreateInput_1: PostCreateInput!) {
990
- \tcreateAuthor(data: $AuthorCreateInput_0) {
991
- \t\tok
992
- \t\terrorMessage
993
- \t\terrors {
994
- \t\t\t... MutationError
995
- \t\t}
996
- \t\tvalidation {
997
- \t\t\t... ValidationResult
998
- \t\t}
999
- \t}
1000
- \tcreatePost(data: $PostCreateInput_1) {
1001
- \t\tok
1002
- \t\terrorMessage
1003
- \t\terrors {
1004
- \t\t\t... MutationError
1005
- \t\t}
1006
- \t\tvalidation {
1007
- \t\t\t... ValidationResult
1008
- \t\t}
1009
- \t}
1001
+ createAuthor(data: $AuthorCreateInput_0) {
1002
+ ok
1003
+ errorMessage
1004
+ errors {
1005
+ ... MutationError
1006
+ }
1007
+ validation {
1008
+ ... ValidationResult
1009
+ }
1010
+ }
1011
+ createPost(data: $PostCreateInput_1) {
1012
+ ok
1013
+ errorMessage
1014
+ errors {
1015
+ ... MutationError
1016
+ }
1017
+ validation {
1018
+ ... ValidationResult
1019
+ }
1020
+ }
1010
1021
  }
1011
1022
  fragment MutationError on _MutationError {
1012
- \tpaths {
1013
- \t\t... on _FieldPathFragment {
1014
- \t\t\tfield
1015
- \t\t}
1016
- \t\t... on _IndexPathFragment {
1017
- \t\t\tindex
1018
- \t\t\talias
1019
- \t\t}
1020
- \t}
1021
- \tmessage
1022
- \ttype
1023
+ paths {
1024
+ ... on _FieldPathFragment {
1025
+ field
1026
+ }
1027
+ ... on _IndexPathFragment {
1028
+ index
1029
+ alias
1030
+ }
1031
+ }
1032
+ message
1033
+ type
1023
1034
  }
1024
1035
  fragment ValidationResult on _ValidationResult {
1025
- \tvalid
1026
- \terrors {
1027
- \t\tpath {
1028
- \t\t\t... on _FieldPathFragment {
1029
- \t\t\t\tfield
1030
- \t\t\t}
1031
- \t\t\t... on _IndexPathFragment {
1032
- \t\t\t\tindex
1033
- \t\t\t\talias
1034
- \t\t\t}
1035
- \t\t}
1036
- \t\tmessage {
1037
- \t\t\ttext
1038
- \t\t}
1039
- \t}
1036
+ valid
1037
+ errors {
1038
+ path {
1039
+ ... on _FieldPathFragment {
1040
+ field
1041
+ }
1042
+ ... on _IndexPathFragment {
1043
+ index
1044
+ alias
1045
+ }
1046
+ }
1047
+ message {
1048
+ text
1049
+ }
1050
+ }
1040
1051
  }
1041
1052
  "
1042
1053
  `;
@@ -1055,52 +1066,53 @@ exports[`mutations without trx multiple named mutations 2`] = `
1055
1066
 
1056
1067
  exports[`mutations without trx mutation and query combo 1`] = `
1057
1068
  "mutation($PostCreateInput_0: PostCreateInput!, $PostUniqueWhere_1: PostUniqueWhere!) {
1058
- \tcreatePost(data: $PostCreateInput_0) {
1059
- \t\tok
1060
- \t\terrorMessage
1061
- \t\terrors {
1062
- \t\t\t... MutationError
1063
- \t\t}
1064
- \t\tvalidation {
1065
- \t\t\t... ValidationResult
1066
- \t\t}
1067
- \t}
1068
- \tpost: query {
1069
- \t\tvalue: getPost(by: $PostUniqueWhere_1) {
1070
- \t\t\tid
1071
- \t\t\tpublishedAt
1072
- \t\t}
1073
- \t}
1069
+ createPost(data: $PostCreateInput_0) {
1070
+ ok
1071
+ errorMessage
1072
+ errors {
1073
+ ... MutationError
1074
+ }
1075
+ validation {
1076
+ ... ValidationResult
1077
+ }
1078
+ }
1079
+ post: query {
1080
+ value: getPost(by: $PostUniqueWhere_1) {
1081
+ id
1082
+ publishedAt
1083
+ status
1084
+ }
1085
+ }
1074
1086
  }
1075
1087
  fragment MutationError on _MutationError {
1076
- \tpaths {
1077
- \t\t... on _FieldPathFragment {
1078
- \t\t\tfield
1079
- \t\t}
1080
- \t\t... on _IndexPathFragment {
1081
- \t\t\tindex
1082
- \t\t\talias
1083
- \t\t}
1084
- \t}
1085
- \tmessage
1086
- \ttype
1088
+ paths {
1089
+ ... on _FieldPathFragment {
1090
+ field
1091
+ }
1092
+ ... on _IndexPathFragment {
1093
+ index
1094
+ alias
1095
+ }
1096
+ }
1097
+ message
1098
+ type
1087
1099
  }
1088
1100
  fragment ValidationResult on _ValidationResult {
1089
- \tvalid
1090
- \terrors {
1091
- \t\tpath {
1092
- \t\t\t... on _FieldPathFragment {
1093
- \t\t\t\tfield
1094
- \t\t\t}
1095
- \t\t\t... on _IndexPathFragment {
1096
- \t\t\t\tindex
1097
- \t\t\t\talias
1098
- \t\t\t}
1099
- \t\t}
1100
- \t\tmessage {
1101
- \t\t\ttext
1102
- \t\t}
1103
- \t}
1101
+ valid
1102
+ errors {
1103
+ path {
1104
+ ... on _FieldPathFragment {
1105
+ field
1106
+ }
1107
+ ... on _IndexPathFragment {
1108
+ index
1109
+ alias
1110
+ }
1111
+ }
1112
+ message {
1113
+ text
1114
+ }
1115
+ }
1104
1116
  }
1105
1117
  "
1106
1118
  `;
@@ -1118,46 +1130,46 @@ exports[`mutations without trx mutation and query combo 2`] = `
1118
1130
 
1119
1131
  exports[`mutations without trx update locale relation 1`] = `
1120
1132
  "mutation($PostUniqueWhere_0: PostUniqueWhere!, $PostUpdateInput_1: PostUpdateInput!) {
1121
- \tmut: updatePost(by: $PostUniqueWhere_0, data: $PostUpdateInput_1) {
1122
- \t\tok
1123
- \t\terrorMessage
1124
- \t\terrors {
1125
- \t\t\t... MutationError
1126
- \t\t}
1127
- \t\tvalidation {
1128
- \t\t\t... ValidationResult
1129
- \t\t}
1130
- \t}
1133
+ mut: updatePost(by: $PostUniqueWhere_0, data: $PostUpdateInput_1) {
1134
+ ok
1135
+ errorMessage
1136
+ errors {
1137
+ ... MutationError
1138
+ }
1139
+ validation {
1140
+ ... ValidationResult
1141
+ }
1142
+ }
1131
1143
  }
1132
1144
  fragment MutationError on _MutationError {
1133
- \tpaths {
1134
- \t\t... on _FieldPathFragment {
1135
- \t\t\tfield
1136
- \t\t}
1137
- \t\t... on _IndexPathFragment {
1138
- \t\t\tindex
1139
- \t\t\talias
1140
- \t\t}
1141
- \t}
1142
- \tmessage
1143
- \ttype
1145
+ paths {
1146
+ ... on _FieldPathFragment {
1147
+ field
1148
+ }
1149
+ ... on _IndexPathFragment {
1150
+ index
1151
+ alias
1152
+ }
1153
+ }
1154
+ message
1155
+ type
1144
1156
  }
1145
1157
  fragment ValidationResult on _ValidationResult {
1146
- \tvalid
1147
- \terrors {
1148
- \t\tpath {
1149
- \t\t\t... on _FieldPathFragment {
1150
- \t\t\t\tfield
1151
- \t\t\t}
1152
- \t\t\t... on _IndexPathFragment {
1153
- \t\t\t\tindex
1154
- \t\t\t\talias
1155
- \t\t\t}
1156
- \t\t}
1157
- \t\tmessage {
1158
- \t\t\ttext
1159
- \t\t}
1160
- \t}
1158
+ valid
1159
+ errors {
1160
+ path {
1161
+ ... on _FieldPathFragment {
1162
+ field
1163
+ }
1164
+ ... on _IndexPathFragment {
1165
+ index
1166
+ alias
1167
+ }
1168
+ }
1169
+ message {
1170
+ text
1171
+ }
1172
+ }
1161
1173
  }
1162
1174
  "
1163
1175
  `;
@@ -1187,7 +1199,129 @@ exports[`mutations without trx update locale relation 2`] = `
1187
1199
  }
1188
1200
  `;
1189
1201
 
1190
- exports[`mutations in trx create trx 2`] = `
1202
+ exports[`mutations without trx mutate or fail - fail 1`] = `
1203
+ "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!) {
1204
+ mut: transaction(options: $MutationTransactionOptions_0) {
1205
+ ok
1206
+ errorMessage
1207
+ errors {
1208
+ ... MutationError
1209
+ }
1210
+ validation {
1211
+ ... ValidationResult
1212
+ }
1213
+ mut: createAuthor(data: $AuthorCreateInput_1) {
1214
+ ok
1215
+ errorMessage
1216
+ errors {
1217
+ ... MutationError
1218
+ }
1219
+ validation {
1220
+ ... ValidationResult
1221
+ }
1222
+ }
1223
+ }
1224
+ }
1225
+ fragment MutationError on _MutationError {
1226
+ paths {
1227
+ ... on _FieldPathFragment {
1228
+ field
1229
+ }
1230
+ ... on _IndexPathFragment {
1231
+ index
1232
+ alias
1233
+ }
1234
+ }
1235
+ message
1236
+ type
1237
+ }
1238
+ fragment ValidationResult on _ValidationResult {
1239
+ valid
1240
+ errors {
1241
+ path {
1242
+ ... on _FieldPathFragment {
1243
+ field
1244
+ }
1245
+ ... on _IndexPathFragment {
1246
+ index
1247
+ alias
1248
+ }
1249
+ }
1250
+ message {
1251
+ text
1252
+ }
1253
+ }
1254
+ }
1255
+ "
1256
+ `;
1257
+
1258
+ exports[`mutations without trx mutate or fail - fail 2`] = `
1259
+ {
1260
+ "AuthorCreateInput_1": {
1261
+ "email": "xx@localhost",
1262
+ "name": "John",
1263
+ },
1264
+ "MutationTransactionOptions_0": {},
1265
+ }
1266
+ `;
1267
+
1268
+ exports[`mutations without trx mutate or fail - ok 1`] = `
1269
+ "mutation($MutationTransactionOptions_0: MutationTransactionOptions, $AuthorCreateInput_1: AuthorCreateInput!) {
1270
+ mut: transaction(options: $MutationTransactionOptions_0) {
1271
+ ok
1272
+ errorMessage
1273
+ errors {
1274
+ ... MutationError
1275
+ }
1276
+ validation {
1277
+ ... ValidationResult
1278
+ }
1279
+ mut: createAuthor(data: $AuthorCreateInput_1) {
1280
+ ok
1281
+ errorMessage
1282
+ errors {
1283
+ ... MutationError
1284
+ }
1285
+ validation {
1286
+ ... ValidationResult
1287
+ }
1288
+ }
1289
+ }
1290
+ }
1291
+ fragment MutationError on _MutationError {
1292
+ paths {
1293
+ ... on _FieldPathFragment {
1294
+ field
1295
+ }
1296
+ ... on _IndexPathFragment {
1297
+ index
1298
+ alias
1299
+ }
1300
+ }
1301
+ message
1302
+ type
1303
+ }
1304
+ fragment ValidationResult on _ValidationResult {
1305
+ valid
1306
+ errors {
1307
+ path {
1308
+ ... on _FieldPathFragment {
1309
+ field
1310
+ }
1311
+ ... on _IndexPathFragment {
1312
+ index
1313
+ alias
1314
+ }
1315
+ }
1316
+ message {
1317
+ text
1318
+ }
1319
+ }
1320
+ }
1321
+ "
1322
+ `;
1323
+
1324
+ exports[`mutations without trx mutate or fail - ok 2`] = `
1191
1325
  {
1192
1326
  "AuthorCreateInput_1": {
1193
1327
  "email": "xx@localhost",