@contember/engine-content-api 2.0.0-alpha.38 → 2.0.0-alpha.40

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 (20) hide show
  1. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +2 -2
  2. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
  3. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +2 -2
  4. package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
  5. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +2 -2
  6. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
  7. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +2 -2
  8. package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
  9. package/dist/types/tsconfig.tsbuildinfo +1 -1
  10. package/package.json +10 -10
  11. package/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.ts +2 -2
  12. package/tests/cases/integration/graphQlSchema/schema-acl-allowed.gql +2 -2
  13. package/tests/cases/integration/graphQlSchema/schema-acl-restricted-create.gql +2 -2
  14. package/tests/cases/integration/graphQlSchema/schema-acl-restricted-delete.gql +2 -2
  15. package/tests/cases/integration/graphQlSchema/schema-acl-restricted-update.gql +2 -2
  16. package/tests/cases/integration/graphQlSchema/schema-basic.gql +4 -4
  17. package/tests/cases/integration/graphQlSchema/schema-bug-66.gql +2 -2
  18. package/tests/cases/integration/graphQlSchema/schema-custom-primary.gql +4 -4
  19. package/tests/cases/integration/graphQlSchema/schema-has-many-reduction.gql +2 -2
  20. package/tests/cases/integration/graphQlSchema/schema-new-builder.gql +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/engine-content-api",
3
- "version": "2.0.0-alpha.38",
3
+ "version": "2.0.0-alpha.40",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/production/index.js",
6
6
  "typings": "./dist/types/index.d.ts",
@@ -26,18 +26,18 @@
26
26
  "generate": "gql-gen --config graphql.codegen.yml"
27
27
  },
28
28
  "dependencies": {
29
- "@contember/database": "2.0.0-alpha.38",
30
- "@contember/dic": "2.0.0-alpha.38",
31
- "@contember/graphql-utils": "2.0.0-alpha.38",
32
- "@contember/logger": "2.0.0-alpha.38",
33
- "@contember/schema": "2.0.0-alpha.38",
34
- "@contember/schema-definition": "2.0.0-alpha.38",
35
- "@contember/schema-utils": "2.0.0-alpha.38",
29
+ "@contember/database": "2.0.0-alpha.40",
30
+ "@contember/dic": "2.0.0-alpha.40",
31
+ "@contember/graphql-utils": "2.0.0-alpha.40",
32
+ "@contember/logger": "2.0.0-alpha.40",
33
+ "@contember/schema": "2.0.0-alpha.40",
34
+ "@contember/schema-definition": "2.0.0-alpha.40",
35
+ "@contember/schema-utils": "2.0.0-alpha.40",
36
36
  "fast-deep-equal": "^3.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@contember/database-tester": "2.0.0-alpha.38",
40
- "@contember/schema-definition": "2.0.0-alpha.38",
39
+ "@contember/database-tester": "2.0.0-alpha.40",
40
+ "@contember/schema-definition": "2.0.0-alpha.40",
41
41
  "@types/node": "^20.16.11",
42
42
  "graphql": "^16.9.0",
43
43
  "pg": "^8.12.0"
@@ -63,9 +63,9 @@ export class HasManyToHasOneRelationReducerFieldVisitor implements
63
63
  acceptFieldVisitor(this.schema, targetEntity.name, it, new FieldAccessVisitor(Acl.Operation.read, this.authorizator)),
64
64
  ))
65
65
 
66
- const graphQlName = relation.name + GqlTypeName`By`
66
+ const graphQlName = relation.name + 'By'
67
67
  const uniqueWhere: GraphQLInputObjectType = new GraphQLInputObjectType({
68
- name: GqlTypeName`${entity.name}${relation.name}ByUniqueWhere`,
68
+ name: GqlTypeName`${relation.name}Of${entity.name}ByUniqueWhere`,
69
69
  fields: () => {
70
70
  return this.whereTypeProvider.getUniqueWhereFields(targetEntity, uniqueKeys)
71
71
  },
@@ -38,7 +38,7 @@ type Root {
38
38
  id: UUID!
39
39
  foo: String
40
40
  r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
41
- rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
41
+ rBy(by: ROfRootByUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
42
42
  paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
43
43
  }
44
44
 
@@ -126,7 +126,7 @@ input RootOrderBy {
126
126
  foo: OrderDirection
127
127
  }
128
128
 
129
- input RootRUniqueWhere {
129
+ input ROfRootByUniqueWhere {
130
130
  id: UUID
131
131
  }
132
132
 
@@ -35,7 +35,7 @@ type Root {
35
35
  _meta: RootMeta
36
36
  id: UUID!
37
37
  r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
38
- rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
38
+ rBy(by: ROfRootByUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
39
39
  paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
40
40
  }
41
41
 
@@ -120,7 +120,7 @@ input RootOrderBy {
120
120
  id: OrderDirection
121
121
  }
122
122
 
123
- input RootRUniqueWhere {
123
+ input ROfRootByUniqueWhere {
124
124
  id: UUID
125
125
  }
126
126
 
@@ -37,7 +37,7 @@ type Root {
37
37
  _meta: RootMeta
38
38
  id: UUID!
39
39
  r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
40
- rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
40
+ rBy(by: ROfRootByUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
41
41
  paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
42
42
  }
43
43
 
@@ -122,7 +122,7 @@ input RootOrderBy {
122
122
  id: OrderDirection
123
123
  }
124
124
 
125
- input RootRUniqueWhere {
125
+ input ROfRootByUniqueWhere {
126
126
  id: UUID
127
127
  }
128
128
 
@@ -36,7 +36,7 @@ type Root {
36
36
  _meta: RootMeta
37
37
  id: UUID!
38
38
  r(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], offset: Int, limit: Int): [OneHasManyEntity!]!
39
- rBy(by: RootRUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
39
+ rBy(by: ROfRootByUniqueWhere!, filter: OneHasManyEntityWhere): OneHasManyEntity
40
40
  paginateR(filter: OneHasManyEntityWhere, orderBy: [OneHasManyEntityOrderBy!], skip: Int, first: Int): OneHasManyEntityConnection!
41
41
  }
42
42
 
@@ -121,7 +121,7 @@ input RootOrderBy {
121
121
  id: OrderDirection
122
122
  }
123
123
 
124
- input RootRUniqueWhere {
124
+ input ROfRootByUniqueWhere {
125
125
  id: UUID
126
126
  }
127
127
 
@@ -29,7 +29,7 @@ type Author {
29
29
  name: String
30
30
  posts(filter: PostWhere, orderBy: [PostOrderBy!], offset: Int, limit: Int): [Post!]!
31
31
  postsByLocales(by: AuthorPostsByLocalesUniqueWhere!, filter: PostWhere): Post
32
- postsBy(by: AuthorPostsUniqueWhere!, filter: PostWhere): Post
32
+ postsBy(by: PostsOfAuthorByUniqueWhere!, filter: PostWhere): Post
33
33
  paginatePosts(filter: PostWhere, orderBy: [PostOrderBy!], skip: Int, first: Int): PostConnection!
34
34
  }
35
35
 
@@ -53,7 +53,7 @@ type Post {
53
53
  publishedAt: DateTime
54
54
  locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
55
55
  categories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], offset: Int, limit: Int): [Category!]!
56
- localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
56
+ localesBy(by: LocalesOfPostByUniqueWhere!, filter: PostLocaleWhere): PostLocale
57
57
  paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
58
58
  paginateCategories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], skip: Int, first: Int): CategoryConnection!
59
59
  }
@@ -237,7 +237,7 @@ input CategoryOrderBy {
237
237
  name: OrderDirection
238
238
  }
239
239
 
240
- input PostLocalesUniqueWhere {
240
+ input LocalesOfPostByUniqueWhere {
241
241
  id: UUID
242
242
  }
243
243
 
@@ -267,7 +267,7 @@ input PostLocaleUniqueWhere {
267
267
  id: UUID
268
268
  }
269
269
 
270
- input AuthorPostsUniqueWhere {
270
+ input PostsOfAuthorByUniqueWhere {
271
271
  id: UUID
272
272
  locales: PostLocaleUniqueWhere
273
273
  }
@@ -42,7 +42,7 @@ type FrontPage {
42
42
  introVideo(filter: VideoWhere): Video
43
43
  inHouseVideos(filter: VideoWhere, orderBy: [VideoOrderBy!], offset: Int, limit: Int): [Video!]!
44
44
  inHouseVideosByFrontPageForIntro(by: FrontPageInHouseVideosByFrontPageForIntroUniqueWhere!, filter: VideoWhere): Video
45
- inHouseVideosBy(by: FrontPageInHouseVideosUniqueWhere!, filter: VideoWhere): Video
45
+ inHouseVideosBy(by: InHouseVideosOfFrontPageByUniqueWhere!, filter: VideoWhere): Video
46
46
  paginateInHouseVideos(filter: VideoWhere, orderBy: [VideoOrderBy!], skip: Int, first: Int): VideoConnection!
47
47
  }
48
48
 
@@ -171,7 +171,7 @@ input VideoUniqueWhere {
171
171
  frontPageForIntro: FrontPageUniqueWhere
172
172
  }
173
173
 
174
- input FrontPageInHouseVideosUniqueWhere {
174
+ input InHouseVideosOfFrontPageByUniqueWhere {
175
175
  id: UUID
176
176
  frontPageForIntro: FrontPageUniqueWhere
177
177
  }
@@ -29,7 +29,7 @@ type Author {
29
29
  name: String
30
30
  posts(filter: PostWhere, orderBy: [PostOrderBy!], offset: Int, limit: Int): [Post!]!
31
31
  postsByLocales(by: AuthorPostsByLocalesUniqueWhere!, filter: PostWhere): Post
32
- postsBy(by: AuthorPostsUniqueWhere!, filter: PostWhere): Post
32
+ postsBy(by: PostsOfAuthorByUniqueWhere!, filter: PostWhere): Post
33
33
  paginatePosts(filter: PostWhere, orderBy: [PostOrderBy!], skip: Int, first: Int): PostConnection!
34
34
  }
35
35
 
@@ -53,7 +53,7 @@ type Post {
53
53
  publishedAt: DateTime
54
54
  locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
55
55
  categories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], offset: Int, limit: Int): [Category!]!
56
- localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
56
+ localesBy(by: LocalesOfPostByUniqueWhere!, filter: PostLocaleWhere): PostLocale
57
57
  paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
58
58
  paginateCategories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], skip: Int, first: Int): CategoryConnection!
59
59
  }
@@ -237,7 +237,7 @@ input CategoryOrderBy {
237
237
  name: OrderDirection
238
238
  }
239
239
 
240
- input PostLocalesUniqueWhere {
240
+ input LocalesOfPostByUniqueWhere {
241
241
  id: UUID
242
242
  }
243
243
 
@@ -267,7 +267,7 @@ input PostLocaleUniqueWhere {
267
267
  id: UUID
268
268
  }
269
269
 
270
- input AuthorPostsUniqueWhere {
270
+ input PostsOfAuthorByUniqueWhere {
271
271
  id: UUID
272
272
  locales: PostLocaleUniqueWhere
273
273
  }
@@ -41,7 +41,7 @@ type Post {
41
41
  publishedAt: DateTime
42
42
  locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
43
43
  localesByLocale(by: PostLocalesByLocaleUniqueWhere!, filter: PostLocaleWhere): PostLocale
44
- localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
44
+ localesBy(by: LocalesOfPostByUniqueWhere!, filter: PostLocaleWhere): PostLocale
45
45
  paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
46
46
  }
47
47
 
@@ -153,7 +153,7 @@ input PostLocalesByLocaleUniqueWhere {
153
153
  locale: String
154
154
  }
155
155
 
156
- input PostLocalesUniqueWhere {
156
+ input LocalesOfPostByUniqueWhere {
157
157
  id: UUID
158
158
  locale: String
159
159
  }
@@ -29,7 +29,7 @@ type Author {
29
29
  name: String
30
30
  posts(filter: PostWhere, orderBy: [PostOrderBy!], offset: Int, limit: Int): [Post!]!
31
31
  postsByLocales(by: AuthorPostsByLocalesUniqueWhere!, filter: PostWhere): Post
32
- postsBy(by: AuthorPostsUniqueWhere!, filter: PostWhere): Post
32
+ postsBy(by: PostsOfAuthorByUniqueWhere!, filter: PostWhere): Post
33
33
  paginatePosts(filter: PostWhere, orderBy: [PostOrderBy!], skip: Int, first: Int): PostConnection!
34
34
  }
35
35
 
@@ -55,7 +55,7 @@ type Post {
55
55
  author(filter: AuthorWhere): Author
56
56
  locales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], offset: Int, limit: Int): [PostLocale!]!
57
57
  localesByLocale(by: PostLocalesByLocaleUniqueWhere!, filter: PostLocaleWhere): PostLocale
58
- localesBy(by: PostLocalesUniqueWhere!, filter: PostLocaleWhere): PostLocale
58
+ localesBy(by: LocalesOfPostByUniqueWhere!, filter: PostLocaleWhere): PostLocale
59
59
  paginateCategories(filter: CategoryWhere, orderBy: [CategoryOrderBy!], skip: Int, first: Int): CategoryConnection!
60
60
  paginateLocales(filter: PostLocaleWhere, orderBy: [PostLocaleOrderBy!], skip: Int, first: Int): PostLocaleConnection!
61
61
  }
@@ -293,7 +293,7 @@ input PostLocalesByLocaleUniqueWhere {
293
293
  locale: Locale
294
294
  }
295
295
 
296
- input PostLocalesUniqueWhere {
296
+ input LocalesOfPostByUniqueWhere {
297
297
  id: UUID
298
298
  locale: Locale
299
299
  }
@@ -331,7 +331,7 @@ input PostUniqueWhere {
331
331
  locales: PostLocaleUniqueWhere
332
332
  }
333
333
 
334
- input AuthorPostsUniqueWhere {
334
+ input PostsOfAuthorByUniqueWhere {
335
335
  id: UUID
336
336
  locales: PostLocaleUniqueWhere
337
337
  }