@contember/engine-system-api 2.0.0-alpha.15 → 2.0.0-alpha.16

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.
@@ -19,4 +19,4 @@ generates:
19
19
  - "typescript-resolvers"
20
20
  hooks:
21
21
  afterAllFileWrite:
22
- - eslint --fix
22
+ - yarn run -T eslint --fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contember/engine-system-api",
3
- "version": "2.0.0-alpha.15",
3
+ "version": "2.0.0-alpha.16",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/production/index.js",
6
6
  "typings": "./dist/types/index.d.ts",
@@ -22,32 +22,25 @@
22
22
  }
23
23
  }
24
24
  },
25
- "scripts": {
26
- "generate": "gql-gen --config graphql.codegen.yml"
27
- },
28
25
  "dependencies": {
29
- "@contember/authorization": "2.0.0-alpha.15",
30
- "@contember/database": "2.0.0-alpha.15",
31
- "@contember/database-migrations": "2.0.0-alpha.15",
32
- "@contember/dic": "2.0.0-alpha.15",
33
- "@contember/graphql-utils": "2.0.0-alpha.15",
34
- "@contember/logger": "2.0.0-alpha.15",
35
- "@contember/queryable": "2.0.0-alpha.15",
36
- "@contember/schema": "2.0.0-alpha.15",
37
- "@contember/schema-migrations": "2.0.0-alpha.15",
38
- "@contember/schema-utils": "2.0.0-alpha.15",
39
- "@graphql-tools/utils": "^10.0.8",
26
+ "@contember/authorization": "2.0.0-alpha.16",
27
+ "@contember/database": "2.0.0-alpha.16",
28
+ "@contember/database-migrations": "2.0.0-alpha.16",
29
+ "@contember/dic": "2.0.0-alpha.16",
30
+ "@contember/graphql-utils": "2.0.0-alpha.16",
31
+ "@contember/logger": "2.0.0-alpha.16",
32
+ "@contember/queryable": "2.0.0-alpha.16",
33
+ "@contember/schema": "2.0.0-alpha.16",
34
+ "@contember/schema-migrations": "2.0.0-alpha.16",
35
+ "@contember/schema-utils": "2.0.0-alpha.16",
36
+ "@graphql-tools/utils": "^10.5.4",
40
37
  "graphql-tag": "^2.12.6"
41
38
  },
42
39
  "devDependencies": {
43
- "@contember/schema-definition": "2.0.0-alpha.15",
44
- "@graphql-codegen/cli": "^5.0.0",
45
- "@graphql-codegen/typescript": "^4.0.1",
46
- "@graphql-codegen/typescript-operations": "^4.0.1",
47
- "@graphql-codegen/typescript-resolvers": "^4.0.1",
48
- "@types/node": "^20.9.0",
49
- "graphql": "^16.8.1",
50
- "pg": "^8.11.3"
40
+ "@contember/schema-definition": "2.0.0-alpha.16",
41
+ "@types/node": "^20.16.5",
42
+ "graphql": "^16.9.0",
43
+ "pg": "^8.12.0"
51
44
  },
52
45
  "peerDependencies": {
53
46
  "graphql": ">= 14.6.0",
@@ -10,7 +10,7 @@ export const snapshotMigration = (sqlFactory: (args: { randomUuidFn: string }) =
10
10
  WHERE pg_namespace.nspname = 'pg_catalog' AND pg_proc.proname = 'gen_random_uuid'
11
11
  `)
12
12
  let randomUuidFn: string = 'uuid_generate_v4'
13
- if (hasGenRandomUuid.rowCount > 0) {
13
+ if ((hasGenRandomUuid.rowCount ?? 0) > 0) {
14
14
  randomUuidFn = 'gen_random_uuid'
15
15
  } else {
16
16
  const hasUuidGenV4 = await args.connection.query(`
@@ -14,10 +14,10 @@ export type Scalars = {
14
14
  Boolean: { input: boolean; output: boolean }
15
15
  Int: { input: number; output: number }
16
16
  Float: { input: number; output: number }
17
- Schema: { input: any; output: any }
18
17
  DateTime: { input: Date; output: Date }
19
18
  Json: { input: unknown; output: unknown }
20
19
  PrimaryKey: { input: string | number; output: string | number }
20
+ Schema: { input: any; output: any }
21
21
  }
22
22
 
23
23
  export type ContentMigration = {
@@ -368,7 +368,7 @@ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs
368
368
 
369
369
 
370
370
  /** Mapping of interface types */
371
- export type ResolversInterfaceTypes<RefType extends Record<string, unknown>> = {
371
+ export type ResolversInterfaceTypes<_RefType extends Record<string, unknown>> = {
372
372
  Event: (CreateEvent) | (DeleteEvent) | (UpdateEvent)
373
373
  }
374
374
 
@@ -376,7 +376,6 @@ export type ResolversInterfaceTypes<RefType extends Record<string, unknown>> = {
376
376
  export type ResolversTypes = {
377
377
  Boolean: ResolverTypeWrapper<Scalars['Boolean']['output']>
378
378
  ContentMigration: ContentMigration
379
- Schema: ResolverTypeWrapper<Scalars['Schema']['output']>
380
379
  CreateEvent: ResolverTypeWrapper<CreateEvent>
381
380
  DateTime: ResolverTypeWrapper<Scalars['DateTime']['output']>
382
381
  DeleteEvent: ResolverTypeWrapper<DeleteEvent>
@@ -407,6 +406,7 @@ export type ResolversTypes = {
407
406
  Mutation: ResolverTypeWrapper<{}>
408
407
  PrimaryKey: ResolverTypeWrapper<Scalars['PrimaryKey']['output']>
409
408
  Query: ResolverTypeWrapper<{}>
409
+ Schema: ResolverTypeWrapper<Scalars['Schema']['output']>
410
410
  SchemaMigration: SchemaMigration
411
411
  Stage: ResolverTypeWrapper<Stage>
412
412
  String: ResolverTypeWrapper<Scalars['String']['output']>
@@ -418,7 +418,6 @@ export type ResolversTypes = {
418
418
  export type ResolversParentTypes = {
419
419
  Boolean: Scalars['Boolean']['output']
420
420
  ContentMigration: ContentMigration
421
- Schema: Scalars['Schema']['output']
422
421
  CreateEvent: CreateEvent
423
422
  DateTime: Scalars['DateTime']['output']
424
423
  DeleteEvent: DeleteEvent
@@ -443,6 +442,7 @@ export type ResolversParentTypes = {
443
442
  Mutation: {}
444
443
  PrimaryKey: Scalars['PrimaryKey']['output']
445
444
  Query: {}
445
+ Schema: Scalars['Schema']['output']
446
446
  SchemaMigration: SchemaMigration
447
447
  Stage: Stage
448
448
  String: Scalars['String']['output']
@@ -450,10 +450,6 @@ export type ResolversParentTypes = {
450
450
  UpdateEvent: UpdateEvent
451
451
  }
452
452
 
453
- export interface SchemaScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['Schema'], any> {
454
- name: 'Schema'
455
- }
456
-
457
453
  export type CreateEventResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateEvent'] = ResolversParentTypes['CreateEvent']> = {
458
454
  appliedAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>
459
455
  createdAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>
@@ -579,6 +575,10 @@ export type QueryResolvers<ContextType = any, ParentType extends ResolversParent
579
575
  stages?: Resolver<ReadonlyArray<ResolversTypes['Stage']>, ParentType, ContextType>
580
576
  }
581
577
 
578
+ export interface SchemaScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['Schema'], any> {
579
+ name: 'Schema'
580
+ }
581
+
582
582
  export type StageResolvers<ContextType = any, ParentType extends ResolversParentTypes['Stage'] = ResolversParentTypes['Stage']> = {
583
583
  id?: Resolver<ResolversTypes['String'], ParentType, ContextType>
584
584
  name?: Resolver<ResolversTypes['String'], ParentType, ContextType>
@@ -608,7 +608,6 @@ export type UpdateEventResolvers<ContextType = any, ParentType extends Resolvers
608
608
  }
609
609
 
610
610
  export type Resolvers<ContextType = any> = {
611
- Schema?: GraphQLScalarType
612
611
  CreateEvent?: CreateEventResolvers<ContextType>
613
612
  DateTime?: GraphQLScalarType
614
613
  DeleteEvent?: DeleteEventResolvers<ContextType>
@@ -625,6 +624,7 @@ export type Resolvers<ContextType = any> = {
625
624
  Mutation?: MutationResolvers<ContextType>
626
625
  PrimaryKey?: GraphQLScalarType
627
626
  Query?: QueryResolvers<ContextType>
627
+ Schema?: GraphQLScalarType
628
628
  Stage?: StageResolvers<ContextType>
629
629
  TruncateResponse?: TruncateResponseResolvers<ContextType>
630
630
  UpdateEvent?: UpdateEventResolvers<ContextType>