@contember/engine-content-api 1.3.0-alpha.8 → 1.3.0-beta.2

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 (107) hide show
  1. package/dist/src/ExecutionContainer.d.ts +3 -3
  2. package/dist/src/ExecutionContainer.d.ts.map +1 -1
  3. package/dist/src/acl/Authorizator.d.ts +1 -1
  4. package/dist/src/acl/Authorizator.d.ts.map +1 -1
  5. package/dist/src/extensions/EntityFieldsProvider.d.ts +1 -1
  6. package/dist/src/extensions/EntityFieldsProvider.d.ts.map +1 -1
  7. package/dist/src/input-validation/InputValidator.d.ts +1 -1
  8. package/dist/src/input-validation/InputValidator.d.ts.map +1 -1
  9. package/dist/src/input-validation/ValidationContext.js +1 -2
  10. package/dist/src/input-validation/ValidationContext.js.map +1 -1
  11. package/dist/src/input-validation/ValidationPath.d.ts +1 -1
  12. package/dist/src/input-validation/ValidationPath.d.ts.map +1 -1
  13. package/dist/src/input-validation/dependencies/DependencyCollector.d.ts +1 -1
  14. package/dist/src/input-validation/dependencies/DependencyCollector.d.ts.map +1 -1
  15. package/dist/src/input-validation/preValidation/CreateInputPreValidationProcessor.d.ts +1 -1
  16. package/dist/src/input-validation/preValidation/CreateInputPreValidationProcessor.d.ts.map +1 -1
  17. package/dist/src/input-validation/preValidation/UpdateInputPreValidationProcessor.d.ts +1 -1
  18. package/dist/src/input-validation/preValidation/UpdateInputPreValidationProcessor.d.ts.map +1 -1
  19. package/dist/src/inputProcessing/UniqueWhereExpander.d.ts +1 -1
  20. package/dist/src/inputProcessing/UniqueWhereExpander.d.ts.map +1 -1
  21. package/dist/src/introspection/content-schema.types.d.ts +22 -22
  22. package/dist/src/introspection/content-schema.types.d.ts.map +1 -1
  23. package/dist/src/introspection/content-schema.types.js +3 -3
  24. package/dist/src/introspection/content-schema.types.js.map +1 -1
  25. package/dist/src/mapper/ColumnValue.d.ts +2 -2
  26. package/dist/src/mapper/ColumnValue.d.ts.map +1 -1
  27. package/dist/src/mapper/DataManipulationBuilder.d.ts +1 -1
  28. package/dist/src/mapper/DataManipulationBuilder.d.ts.map +1 -1
  29. package/dist/src/mapper/EventManager.d.ts +4 -4
  30. package/dist/src/mapper/EventManager.d.ts.map +1 -1
  31. package/dist/src/mapper/JunctionTableManager.d.ts +2 -2
  32. package/dist/src/mapper/JunctionTableManager.d.ts.map +1 -1
  33. package/dist/src/mapper/MapperFactory.d.ts +1 -1
  34. package/dist/src/mapper/MapperFactory.d.ts.map +1 -1
  35. package/dist/src/mapper/Result.d.ts +5 -5
  36. package/dist/src/mapper/Result.d.ts.map +1 -1
  37. package/dist/src/mapper/Result.js +6 -6
  38. package/dist/src/mapper/Result.js.map +1 -1
  39. package/dist/src/mapper/delete/DeleteExecutor.d.ts.map +1 -1
  40. package/dist/src/mapper/delete/DeleteExecutor.js +3 -0
  41. package/dist/src/mapper/delete/DeleteExecutor.js.map +1 -1
  42. package/dist/src/mapper/delete/helpers.d.ts +3 -3
  43. package/dist/src/mapper/delete/helpers.d.ts.map +1 -1
  44. package/dist/src/mapper/relations/ManyHasManyInputProcessor.d.ts +1 -1
  45. package/dist/src/mapper/relations/ManyHasManyInputProcessor.d.ts.map +1 -1
  46. package/dist/src/mapper/select/Path.js +3 -3
  47. package/dist/src/mapper/select/Path.js.map +1 -1
  48. package/dist/src/mapper/select/RelationFetcher.d.ts +6 -6
  49. package/dist/src/mapper/select/RelationFetcher.d.ts.map +1 -1
  50. package/dist/src/mapper/select/SelectExecutionHandler.d.ts +2 -2
  51. package/dist/src/mapper/select/SelectExecutionHandler.d.ts.map +1 -1
  52. package/dist/src/mapper/select/SelectHydrator.d.ts +7 -7
  53. package/dist/src/mapper/select/SelectHydrator.d.ts.map +1 -1
  54. package/dist/src/mapper/select/WhereBuilder.d.ts +1 -1
  55. package/dist/src/mapper/select/WhereBuilder.d.ts.map +1 -1
  56. package/dist/src/mapper/types.d.ts +1 -1
  57. package/dist/src/mapper/types.d.ts.map +1 -1
  58. package/dist/src/resolvers/GraphQlQueryAstFactory.d.ts +1 -1
  59. package/dist/src/resolvers/GraphQlQueryAstFactory.d.ts.map +1 -1
  60. package/dist/src/resolvers/MutationResolver.d.ts +2 -2
  61. package/dist/src/resolvers/MutationResolver.d.ts.map +1 -1
  62. package/dist/src/schema/ColumnTypeResolver.d.ts +1 -1
  63. package/dist/src/schema/ColumnTypeResolver.d.ts.map +1 -1
  64. package/dist/src/schema/MutationProvider.d.ts +1 -1
  65. package/dist/src/schema/MutationProvider.d.ts.map +1 -1
  66. package/dist/src/schema/ValidationQueriesProvider.d.ts +1 -1
  67. package/dist/src/schema/ValidationQueriesProvider.d.ts.map +1 -1
  68. package/dist/src/schema/mutations/EntityInputProvider.js +1 -1
  69. package/dist/src/schema/mutations/EntityInputProvider.js.map +1 -1
  70. package/dist/src/tsconfig.tsbuildinfo +1 -1
  71. package/dist/src/utils/Interface.d.ts +1 -1
  72. package/dist/src/utils/Interface.d.ts.map +1 -1
  73. package/dist/src/utils/object.d.ts +2 -2
  74. package/dist/src/utils/object.d.ts.map +1 -1
  75. package/dist/src/utils/uniqueWhereFields.d.ts +1 -1
  76. package/dist/src/utils/uniqueWhereFields.d.ts.map +1 -1
  77. package/dist/tests/cases/integration/graphQlRequests/delete/restrictOnDelete.test.js +64 -0
  78. package/dist/tests/cases/integration/graphQlRequests/delete/restrictOnDelete.test.js.map +1 -1
  79. package/dist/tests/cases/integration/graphQlRequests/validation/conditions.test.js +1 -1
  80. package/dist/tests/cases/integration/graphQlRequests/validation/conditions.test.js.map +1 -1
  81. package/dist/tests/cases/integration/graphQlRequests/validation/optionalAssert.test.js +1 -1
  82. package/dist/tests/cases/integration/graphQlRequests/validation/optionalAssert.test.js.map +1 -1
  83. package/dist/tests/cases/integration/graphQlRequests/validation/requiredWhen.test.js +1 -1
  84. package/dist/tests/cases/integration/graphQlRequests/validation/requiredWhen.test.js.map +1 -1
  85. package/dist/tests/cases/integration/graphQlSchema/model.js +2 -3
  86. package/dist/tests/cases/integration/graphQlSchema/model.js.map +1 -1
  87. package/dist/tests/src/utils.d.ts +1 -1
  88. package/dist/tests/src/utils.d.ts.map +1 -1
  89. package/dist/tests/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +13 -14
  91. package/src/mapper/delete/DeleteExecutor.ts +4 -0
  92. package/tests/cases/integration/graphQlRequests/delete/restrictOnDelete.test.ts +54 -1
  93. package/dist/tests/cases/integration/graphQlSchema/schema-acl-allowed.gql +0 -420
  94. package/dist/tests/cases/integration/graphQlSchema/schema-acl-create-only.gql +0 -229
  95. package/dist/tests/cases/integration/graphQlSchema/schema-acl-predicate.gql +0 -112
  96. package/dist/tests/cases/integration/graphQlSchema/schema-acl-predicate2.gql +0 -112
  97. package/dist/tests/cases/integration/graphQlSchema/schema-acl-restricted-create.gql +0 -309
  98. package/dist/tests/cases/integration/graphQlSchema/schema-acl-restricted-delete.gql +0 -402
  99. package/dist/tests/cases/integration/graphQlSchema/schema-acl-restricted-update.gql +0 -338
  100. package/dist/tests/cases/integration/graphQlSchema/schema-acl.gql +0 -221
  101. package/dist/tests/cases/integration/graphQlSchema/schema-aliased-type.gql +0 -226
  102. package/dist/tests/cases/integration/graphQlSchema/schema-basic.gql +0 -841
  103. package/dist/tests/cases/integration/graphQlSchema/schema-bug-66.gql +0 -540
  104. package/dist/tests/cases/integration/graphQlSchema/schema-custom-primary.gql +0 -851
  105. package/dist/tests/cases/integration/graphQlSchema/schema-has-many-reduction.gql +0 -453
  106. package/dist/tests/cases/integration/graphQlSchema/schema-new-builder.gql +0 -912
  107. package/dist/tests/cases/integration/graphQlSchema/schema-view-entity.gql +0 -112
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/engine-content-api",
3
- "version": "1.3.0-alpha.8",
3
+ "version": "1.3.0-beta.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/src/index.js",
6
6
  "typings": "dist/src/index.d.ts",
@@ -9,26 +9,25 @@
9
9
  "default": "./dist/src/index.js"
10
10
  },
11
11
  "scripts": {
12
- "build-copy": "mkdir -p dist && find ./tests/ -name '*.gql' -type f -exec cp --parents {} ./dist \\;",
13
12
  "generate": "gql-gen --config graphql.codegen.yml",
14
- "test": "vitest --no-threads"
13
+ "test": "vitest --dir ./tests/cases --no-threads"
15
14
  },
16
15
  "dependencies": {
17
- "@contember/database": "^1.3.0-alpha.8",
18
- "@contember/dic": "^1.3.0-alpha.8",
19
- "@contember/logger": "^1.3.0-alpha.8",
20
- "@contember/graphql-utils": "^1.3.0-alpha.8",
21
- "@contember/schema": "^1.3.0-alpha.8",
22
- "@contember/schema-definition": "^1.3.0-alpha.8",
23
- "@contember/schema-utils": "^1.3.0-alpha.8",
16
+ "@contember/database": "1.3.0-beta.2",
17
+ "@contember/dic": "1.3.0-beta.2",
18
+ "@contember/graphql-utils": "1.3.0-beta.2",
19
+ "@contember/logger": "1.3.0-beta.2",
20
+ "@contember/schema": "1.3.0-beta.2",
21
+ "@contember/schema-definition": "1.3.0-beta.2",
22
+ "@contember/schema-utils": "1.3.0-beta.2",
24
23
  "@graphql-tools/schema": "^8.3.5",
25
24
  "fast-deep-equal": "^3.1.3",
26
25
  "graphql-tag": "^2.12.5"
27
26
  },
28
27
  "devDependencies": {
29
- "@contember/database-tester": "^1.3.0-alpha.8",
30
- "@contember/engine-api-tester": "^1.3.0-alpha.8",
31
- "@contember/schema-definition": "^1.3.0-alpha.8",
28
+ "@contember/database-tester": "1.3.0-beta.2",
29
+ "@contember/engine-api-tester": "1.3.0-beta.2",
30
+ "@contember/schema-definition": "1.3.0-beta.2",
32
31
  "@graphql-codegen/cli": "^2.6.2",
33
32
  "@graphql-codegen/typescript": "^2.5.1",
34
33
  "@graphql-codegen/typescript-operations": "^2.4.2",
@@ -41,4 +40,4 @@
41
40
  "graphql": ">= 14.6.0",
42
41
  "pg": "^8.9.0"
43
42
  }
44
- }
43
+ }
@@ -169,6 +169,10 @@ export class DeleteExecutor {
169
169
  }
170
170
  const owningRelations = findOwningRelations(this.schema, entity)
171
171
  for (const [owningEntity, relation] of owningRelations) {
172
+ if (owningEntity.view) {
173
+ continue
174
+ }
175
+
172
176
  if (relation.joiningColumn.onDelete === Model.OnDelete.restrict) {
173
177
  await this.collectRestrictResult(state, mapper, owningEntity, relation, values)
174
178
  } else if (relation.joiningColumn.onDelete === Model.OnDelete.cascade) {
@@ -1,6 +1,6 @@
1
1
  import { test } from 'vitest'
2
2
  import { execute, failedTransaction, sqlTransaction } from '../../../../src/test'
3
- import { SchemaBuilder } from '@contember/schema-definition'
3
+ import { createSchema, SchemaBuilder, SchemaDefinition as def } from '@contember/schema-definition'
4
4
  import { Model } from '@contember/schema'
5
5
  import { GQL, SQL } from '../../../../src/tags'
6
6
  import { testUuid } from '../../../../src/testUuid'
@@ -100,3 +100,56 @@ test('delete author with restrict on posts - declined', async () => {
100
100
  })
101
101
  })
102
102
 
103
+
104
+ namespace DeleteModelView {
105
+ export class Author {
106
+ name = def.stringColumn()
107
+ stats = def.oneHasOneInverse(AuthorStats, 'author')
108
+ }
109
+
110
+ @def.View('SELECT 1') // not important here
111
+ export class AuthorStats {
112
+ author = def.oneHasOne(Author, 'stats')
113
+ postCount = def.intColumn().notNull()
114
+ }
115
+ }
116
+
117
+ test('delete author with restrict on a view - should be ignored', async () => {
118
+ const schema = createSchema(DeleteModelView)
119
+ await execute({
120
+ schema: schema.model,
121
+ query: GQL`
122
+ mutation {
123
+ deleteAuthor(by: {id: "${testUuid(1)}"}) {
124
+ ok
125
+ }
126
+ }`,
127
+ executes: [
128
+ ...sqlTransaction([
129
+ {
130
+ sql: SQL`select "root_"."id" from "public"."author" as "root_" where "root_"."id" = ?`,
131
+ parameters: [testUuid(1)],
132
+ response: { rows: [{ id: testUuid(1) }] },
133
+ },
134
+ {
135
+ sql: SQL`select "root_"."id" as "id", true as "allowed" from "public"."author" as "root_" where "root_"."id" = ?`,
136
+ parameters: [testUuid(1)],
137
+ response: { rows: [{ id: testUuid(1), allowed: true }] },
138
+ },
139
+ {
140
+ sql: SQL`delete from "public"."author" where "id" in (?)`,
141
+ parameters: [testUuid(1)],
142
+ response: { },
143
+ },
144
+ ]),
145
+ ],
146
+ return: {
147
+ data: {
148
+ deleteAuthor: {
149
+ ok: true,
150
+ },
151
+ },
152
+ },
153
+ })
154
+ })
155
+
@@ -1,420 +0,0 @@
1
- type Query {
2
- getOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
3
- listOneHasManyEntity(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
4
- paginateOneHasManyEntity(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
5
- validateCreateOneHasManyEntity(data: OneHasManyEntityCreateInput!): _ValidationResult!
6
- validateUpdateOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, data: OneHasManyEntityUpdateInput!): _ValidationResult!
7
- getRoot(by: RootUniqueWhere!, filter: RootWhere): Root
8
- listRoot(filter: RootWhere, orderBy: [RootOrderBy!], offset: Int, limit: Int): [Root!]!
9
- paginateRoot(filter: RootWhere, orderBy: [RootOrderBy!], skip: Int, first: Int): RootConnection!
10
- validateCreateRoot(data: RootCreateInput!): _ValidationResult!
11
- validateUpdateRoot(by: RootUniqueWhere!, data: RootUpdateInput!): _ValidationResult!
12
- transaction: QueryTransaction
13
- _info: Info
14
- }
15
-
16
- type OneHasManyEntity {
17
- _meta: OneHasManyEntityMeta
18
- id: UUID!
19
- a: String
20
- r2(filter: RootWhere): Root
21
- }
22
-
23
- type OneHasManyEntityMeta {
24
- id: FieldMeta
25
- a: FieldMeta
26
- r2: FieldMeta
27
- }
28
-
29
- type FieldMeta {
30
- readable: Boolean
31
- updatable: Boolean
32
- }
33
-
34
- scalar UUID
35
-
36
- type Root {
37
- _meta: RootMeta
38
- id: UUID!
39
- foo: String
40
- r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
41
- paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
42
- }
43
-
44
- type RootMeta {
45
- id: FieldMeta
46
- foo: FieldMeta
47
- r: FieldMeta
48
- }
49
-
50
- input OneHasManyEntityWhere {
51
- id: UUIDCondition
52
- a: StringCondition
53
- r2: RootWhere
54
- and: [OneHasManyEntityWhere]
55
- or: [OneHasManyEntityWhere]
56
- not: OneHasManyEntityWhere
57
- }
58
-
59
- input UUIDCondition {
60
- and: [UUIDCondition!]
61
- or: [UUIDCondition!]
62
- not: UUIDCondition
63
- null: Boolean
64
- isNull: Boolean
65
- eq: UUID
66
- notEq: UUID
67
- in: [UUID!]
68
- notIn: [UUID!]
69
- lt: UUID
70
- lte: UUID
71
- gt: UUID
72
- gte: UUID
73
- }
74
-
75
- input StringCondition {
76
- and: [StringCondition!]
77
- or: [StringCondition!]
78
- not: StringCondition
79
- null: Boolean
80
- isNull: Boolean
81
- eq: String
82
- notEq: String
83
- in: [String!]
84
- notIn: [String!]
85
- lt: String
86
- lte: String
87
- gt: String
88
- gte: String
89
- contains: String
90
- startsWith: String
91
- endsWith: String
92
- containsCI: String
93
- startsWithCI: String
94
- endsWithCI: String
95
- }
96
-
97
- input RootWhere {
98
- id: UUIDCondition
99
- foo: StringCondition
100
- r: OneHasManyEntityWhere
101
- and: [RootWhere]
102
- or: [RootWhere]
103
- not: RootWhere
104
- }
105
-
106
- input OneHasManyEntityOrderBy {
107
- _random: Boolean
108
- _randomSeeded: Int
109
- id: OrderDirection
110
- a: OrderDirection
111
- r2: RootOrderBy
112
- }
113
-
114
- enum OrderDirection {
115
- asc
116
- desc
117
- ascNullsFirst
118
- descNullsLast
119
- }
120
-
121
- input RootOrderBy {
122
- _random: Boolean
123
- _randomSeeded: Int
124
- id: OrderDirection
125
- foo: OrderDirection
126
- }
127
-
128
- type OneHasManyEntityConnection {
129
- pageInfo: PageInfo!
130
- edges: [OneHasManyEntityEdge!]!
131
- }
132
-
133
- type PageInfo {
134
- totalCount: Int!
135
- }
136
-
137
- type OneHasManyEntityEdge {
138
- node: OneHasManyEntity!
139
- }
140
-
141
- input OneHasManyEntityUniqueWhere {
142
- id: UUID
143
- }
144
-
145
- type _ValidationResult {
146
- valid: Boolean!
147
- errors: [_ValidationError!]!
148
- }
149
-
150
- type _ValidationError {
151
- path: [_PathFragment!]!
152
- message: _ValidationMessage!
153
- }
154
-
155
- union _PathFragment = _FieldPathFragment | _IndexPathFragment
156
-
157
- type _FieldPathFragment {
158
- field: String!
159
- }
160
-
161
- type _IndexPathFragment {
162
- index: Int!
163
- alias: String
164
- }
165
-
166
- type _ValidationMessage {
167
- text: String!
168
- }
169
-
170
- input OneHasManyEntityCreateInput {
171
- a: String
172
- r2: OneHasManyEntityCreateR2EntityRelationInput
173
- _dummy_field_: Boolean
174
- }
175
-
176
- input OneHasManyEntityCreateR2EntityRelationInput {
177
- connect: RootUniqueWhere
178
- create: RootWithoutRCreateInput
179
- connectOrCreate: OneHasManyEntityConnectOrCreateR2RelationInput
180
- }
181
-
182
- input RootUniqueWhere {
183
- id: UUID
184
- r: OneHasManyEntityUniqueWhere
185
- }
186
-
187
- input RootWithoutRCreateInput {
188
- foo: String
189
- _dummy_field_: Boolean
190
- }
191
-
192
- input OneHasManyEntityConnectOrCreateR2RelationInput {
193
- connect: RootUniqueWhere
194
- create: RootWithoutRCreateInput
195
- }
196
-
197
- input OneHasManyEntityUpdateInput {
198
- a: String
199
- r2: OneHasManyEntityUpdateR2EntityRelationInput
200
- _dummy_field_: Boolean
201
- }
202
-
203
- input OneHasManyEntityUpdateR2EntityRelationInput {
204
- connect: RootUniqueWhere
205
- create: RootWithoutRCreateInput
206
- connectOrCreate: OneHasManyEntityConnectOrCreateR2RelationInput
207
- update: RootWithoutRUpdateInput
208
- upsert: OneHasManyEntityUpsertR2RelationInput
209
- disconnect: Boolean
210
- delete: Boolean
211
- }
212
-
213
- input RootWithoutRUpdateInput {
214
- foo: String
215
- _dummy_field_: Boolean
216
- }
217
-
218
- input OneHasManyEntityUpsertR2RelationInput {
219
- update: RootWithoutRUpdateInput
220
- create: RootWithoutRCreateInput
221
- }
222
-
223
- type RootConnection {
224
- pageInfo: PageInfo!
225
- edges: [RootEdge!]!
226
- }
227
-
228
- type RootEdge {
229
- node: Root!
230
- }
231
-
232
- input RootCreateInput {
233
- foo: String
234
- r: [RootCreateREntityRelationInput!]
235
- _dummy_field_: Boolean
236
- }
237
-
238
- input RootCreateREntityRelationInput {
239
- connect: OneHasManyEntityUniqueWhere
240
- create: OneHasManyEntityWithoutR2CreateInput
241
- connectOrCreate: RootConnectOrCreateRRelationInput
242
- alias: String
243
- }
244
-
245
- input OneHasManyEntityWithoutR2CreateInput {
246
- a: String
247
- _dummy_field_: Boolean
248
- }
249
-
250
- input RootConnectOrCreateRRelationInput {
251
- connect: OneHasManyEntityUniqueWhere
252
- create: OneHasManyEntityWithoutR2CreateInput
253
- }
254
-
255
- input RootUpdateInput {
256
- foo: String
257
- r: [RootUpdateREntityRelationInput!]
258
- _dummy_field_: Boolean
259
- }
260
-
261
- input RootUpdateREntityRelationInput {
262
- create: OneHasManyEntityWithoutR2CreateInput
263
- update: RootUpdateRRelationInput
264
- upsert: RootUpsertRRelationInput
265
- connect: OneHasManyEntityUniqueWhere
266
- disconnect: OneHasManyEntityUniqueWhere
267
- delete: OneHasManyEntityUniqueWhere
268
- alias: String
269
- }
270
-
271
- input RootUpdateRRelationInput {
272
- by: OneHasManyEntityUniqueWhere
273
- data: OneHasManyEntityWithoutR2UpdateInput
274
- }
275
-
276
- input OneHasManyEntityWithoutR2UpdateInput {
277
- a: String
278
- _dummy_field_: Boolean
279
- }
280
-
281
- input RootUpsertRRelationInput {
282
- by: OneHasManyEntityUniqueWhere
283
- update: OneHasManyEntityWithoutR2UpdateInput
284
- create: OneHasManyEntityWithoutR2CreateInput
285
- }
286
-
287
- type QueryTransaction {
288
- getOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
289
- listOneHasManyEntity(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
290
- paginateOneHasManyEntity(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
291
- validateCreateOneHasManyEntity(data: OneHasManyEntityCreateInput!): _ValidationResult!
292
- validateUpdateOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, data: OneHasManyEntityUpdateInput!): _ValidationResult!
293
- getRoot(by: RootUniqueWhere!, filter: RootWhere): Root
294
- listRoot(filter: RootWhere, orderBy: [RootOrderBy!], offset: Int, limit: Int): [Root!]!
295
- paginateRoot(filter: RootWhere, orderBy: [RootOrderBy!], skip: Int, first: Int): RootConnection!
296
- validateCreateRoot(data: RootCreateInput!): _ValidationResult!
297
- validateUpdateRoot(by: RootUniqueWhere!, data: RootUpdateInput!): _ValidationResult!
298
- }
299
-
300
- type Info {
301
- description: String
302
- }
303
-
304
- type Mutation {
305
- createOneHasManyEntity(data: OneHasManyEntityCreateInput!): OneHasManyEntityCreateResult!
306
- deleteOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntityDeleteResult!
307
- updateOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere, data: OneHasManyEntityUpdateInput!): OneHasManyEntityUpdateResult!
308
- upsertOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere, update: OneHasManyEntityUpdateInput!, create: OneHasManyEntityCreateInput!): OneHasManyEntityUpsertResult!
309
- createRoot(data: RootCreateInput!): RootCreateResult!
310
- deleteRoot(by: RootUniqueWhere!, filter: RootWhere): RootDeleteResult!
311
- updateRoot(by: RootUniqueWhere!, filter: RootWhere, data: RootUpdateInput!): RootUpdateResult!
312
- upsertRoot(by: RootUniqueWhere!, filter: RootWhere, update: RootUpdateInput!, create: RootCreateInput!): RootUpsertResult!
313
- transaction(options: MutationTransactionOptions): MutationTransaction!
314
- query: Query!
315
- }
316
-
317
- type OneHasManyEntityCreateResult implements MutationResult {
318
- ok: Boolean!
319
- errorMessage: String
320
- errors: [_MutationError!]!
321
- node: OneHasManyEntity
322
- validation: _ValidationResult!
323
- }
324
-
325
- interface MutationResult {
326
- ok: Boolean!
327
- errorMessage: String
328
- errors: [_MutationError!]!
329
- }
330
-
331
- type _MutationError {
332
- path: [_PathFragment!]! @deprecated(reason: "Use `paths`.")
333
- paths: [[_PathFragment!]!]!
334
- type: _MutationErrorType!
335
- message: String
336
- }
337
-
338
- enum _MutationErrorType {
339
- NotNullConstraintViolation
340
- UniqueConstraintViolation
341
- ForeignKeyConstraintViolation
342
- NotFoundOrDenied
343
- NonUniqueWhereInput
344
- InvalidDataInput
345
- SqlError
346
- }
347
-
348
- type OneHasManyEntityDeleteResult implements MutationResult {
349
- ok: Boolean!
350
- errorMessage: String
351
- errors: [_MutationError!]!
352
- node: OneHasManyEntity
353
- }
354
-
355
- type OneHasManyEntityUpdateResult implements MutationResult {
356
- ok: Boolean!
357
- errorMessage: String
358
- errors: [_MutationError!]!
359
- node: OneHasManyEntity
360
- validation: _ValidationResult!
361
- }
362
-
363
- type OneHasManyEntityUpsertResult implements MutationResult {
364
- ok: Boolean!
365
- errorMessage: String
366
- errors: [_MutationError!]!
367
- node: OneHasManyEntity
368
- validation: _ValidationResult!
369
- }
370
-
371
- type RootCreateResult implements MutationResult {
372
- ok: Boolean!
373
- errorMessage: String
374
- errors: [_MutationError!]!
375
- node: Root
376
- validation: _ValidationResult!
377
- }
378
-
379
- type RootDeleteResult implements MutationResult {
380
- ok: Boolean!
381
- errorMessage: String
382
- errors: [_MutationError!]!
383
- node: Root
384
- }
385
-
386
- type RootUpdateResult implements MutationResult {
387
- ok: Boolean!
388
- errorMessage: String
389
- errors: [_MutationError!]!
390
- node: Root
391
- validation: _ValidationResult!
392
- }
393
-
394
- type RootUpsertResult implements MutationResult {
395
- ok: Boolean!
396
- errorMessage: String
397
- errors: [_MutationError!]!
398
- node: Root
399
- validation: _ValidationResult!
400
- }
401
-
402
- type MutationTransaction {
403
- ok: Boolean!
404
- errorMessage: String
405
- errors: [_MutationError!]!
406
- validation: _ValidationResult!
407
- createOneHasManyEntity(data: OneHasManyEntityCreateInput!): OneHasManyEntityCreateResult!
408
- deleteOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntityDeleteResult!
409
- updateOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere, data: OneHasManyEntityUpdateInput!): OneHasManyEntityUpdateResult!
410
- upsertOneHasManyEntity(by: OneHasManyEntityUniqueWhere!, filter: OneHasManyEntityWhere, update: OneHasManyEntityUpdateInput!, create: OneHasManyEntityCreateInput!): OneHasManyEntityUpsertResult!
411
- createRoot(data: RootCreateInput!): RootCreateResult!
412
- deleteRoot(by: RootUniqueWhere!, filter: RootWhere): RootDeleteResult!
413
- updateRoot(by: RootUniqueWhere!, filter: RootWhere, data: RootUpdateInput!): RootUpdateResult!
414
- upsertRoot(by: RootUniqueWhere!, filter: RootWhere, update: RootUpdateInput!, create: RootCreateInput!): RootUpsertResult!
415
- query: Query
416
- }
417
-
418
- input MutationTransactionOptions {
419
- deferForeignKeyConstraints: Boolean
420
- }