@nest-boot/graphql-connection 7.4.0 → 7.6.0

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.
@@ -1,14 +1,16 @@
1
1
  import type { EntityClass, FilterQuery } from "@mikro-orm/core";
2
2
  import { type Type } from "@nestjs/common";
3
3
  import { GraphQLScalarType } from "graphql";
4
+ import type { ZodType } from "zod";
4
5
  import { ConnectionArgsInterface, ConnectionBuilderOptions, ConnectionInterface, EdgeInterface, FieldOptions, OrderFieldType, OrderInterface } from "./interfaces";
5
6
  type ConnectionBuildResult<Entity extends object> = {
6
7
  Connection: Type<ConnectionInterface<Entity>>;
7
8
  ConnectionArgs: Type<ConnectionArgsInterface<Entity>>;
8
9
  Edge: Type<EdgeInterface<Entity>>;
10
+ Filter: GraphQLScalarType<FilterQuery<Entity>>;
11
+ filterQuerySchema: ZodType<FilterQuery<Entity>>;
9
12
  Order: Type<OrderInterface<Entity>>;
10
13
  OrderField?: OrderFieldType<Entity>;
11
- Filter: GraphQLScalarType<FilterQuery<Entity>>;
12
14
  } & Record<`${EntityClass<Entity>["name"]}Connection`, Type<ConnectionInterface<Entity>>> & Record<`${EntityClass<Entity>["name"]}ConnectionArgs`, Type<ConnectionArgsInterface<Entity>>> & Record<`${EntityClass<Entity>["name"]}Edge`, Type<EdgeInterface<Entity>>> & Record<`${EntityClass<Entity>["name"]}Order`, Type<OrderInterface<Entity>>> & Record<`${EntityClass<Entity>["name"]}OrderField`, OrderFieldType<Entity>> & Record<`${EntityClass<Entity>["name"]}Filter`, GraphQLScalarType<FilterQuery<Entity>>>;
13
15
  export declare class ConnectionBuilder<Entity extends object> {
14
16
  private readonly entityClass;
@@ -32,15 +32,16 @@ class ConnectionBuilder {
32
32
  Connection,
33
33
  ConnectionArgs,
34
34
  Edge,
35
+ Filter,
36
+ filterQuerySchema,
35
37
  Order,
36
38
  OrderField,
37
- Filter,
38
39
  [`${this.entityName}Connection`]: Connection,
39
40
  [`${this.entityName}ConnectionArgs`]: ConnectionArgs,
40
41
  [`${this.entityName}Edge`]: Edge,
42
+ [`${this.entityName}Filter`]: Filter,
41
43
  [`${this.entityName}Order`]: Order,
42
44
  [`${this.entityName}OrderField`]: OrderField,
43
- [`${this.entityName}Filter`]: Filter,
44
45
  };
45
46
  }
46
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"connection.builder.js","sourceRoot":"","sources":["../src/connection.builder.ts"],"names":[],"mappings":";;;AAcA,mCAMiB;AAyBjB,MAAa,iBAAiB;IAU5B,YACmB,WAAgC,EACjD,OAA2C;QAD1B,gBAAW,GAAX,WAAW,CAAqB;QANlC,oBAAe,GAAG,IAAI,GAAG,EAGvC,CAAC;QAMF,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC;QAEnC,IAAI,CAAC,OAAO,GAAG;YACb,GAAG,OAAO;YACV,MAAM,EAAE;gBACN,QAAQ,EAAE,CAAC;gBACX,aAAa,EAAE,EAAE;gBACjB,aAAa,EAAE,CAAC;gBAChB,cAAc,EAAE,GAAG;gBACnB,GAAG,OAAO,EAAE,MAAM;aACnB;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAGN,OAA0C;QAC1C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,MAAM,IAAI,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAE3D,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAA,mBAAW,EACvC,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,eAAe,CACrB,CAAC;QAEF,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,oBAAY,EAChD,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,OAAO,EAAE,M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E,KAAK;YAClC,CAAC,GAAG,IAAI,CAAC,UAAU,YAAY,CAAC,EAAE,UAAU;SACZ,CAAC;IACrC,CAAC;CACF;AApFD,8CAoFC"}
@@ -1,7 +1,7 @@
1
1
  import { EntityClass, FilterQuery } from "@mikro-orm/core";
2
2
  import type { FieldType } from "mikro-orm-filter-query-schema";
3
3
  import type { ZodType } from "zod";
4
- import { FieldOptions } from "./field-options.interface";
4
+ import { FieldOptions } from "../types/field-options.type";
5
5
  export interface ConnectionMetadata<Entity extends object> {
6
6
  entityClass: EntityClass<Entity>;
7
7
  fieldOptionsMap: Map<string, FieldOptions<Entity, FieldType, string>>;
@@ -1,8 +1,8 @@
1
+ export * from "../types/field-options.type";
1
2
  export * from "./connection.interface";
2
3
  export * from "./connection-args.interface";
3
4
  export * from "./connection-builder-options.interface";
4
5
  export * from "./connection-metadata.interface";
5
6
  export * from "./edge.interface";
6
- export * from "./field-options.interface";
7
7
  export * from "./order.interface";
8
8
  export * from "./order-field.type";
@@ -14,12 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("../types/field-options.type"), exports);
17
18
  __exportStar(require("./connection.interface"), exports);
18
19
  __exportStar(require("./connection-args.interface"), exports);
19
20
  __exportStar(require("./connection-builder-options.interface"), exports);
20
21
  __exportStar(require("./connection-metadata.interface"), exports);
21
22
  __exportStar(require("./edge.interface"), exports);
22
- __exportStar(require("./field-options.interface"), exports);
23
23
  __exportStar(require("./order.interface"), exports);
24
24
  __exportStar(require("./order-field.type"), exports);
25
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,8DAA4C;AAC5C,yEAAuD;AACvD,kEAAgD;AAChD,mDAAiC;AACjC,4DAA0C;AAC1C,oDAAkC;AAClC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,yDAAuC;AACvC,8DAA4C;AAC5C,yEAAuD;AACvD,kEAAgD;AAChD,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC"}