@nest-boot/graphql 7.0.0-beta.4 → 7.0.0-beta.5

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 (43) hide show
  1. package/dist/graphql-module-options.interface.d.ts +2 -0
  2. package/dist/graphql-module-options.interface.js.map +1 -0
  3. package/dist/graphql.module-definition.d.ts +1 -2
  4. package/dist/graphql.module.js +3 -22
  5. package/dist/graphql.module.js.map +1 -1
  6. package/dist/index.d.ts +0 -6
  7. package/dist/index.js +1 -8
  8. package/dist/index.js.map +1 -1
  9. package/dist/tsconfig.build.tsbuildinfo +1 -1
  10. package/package.json +1 -16
  11. package/dist/complexities/connection.complexity.d.ts +0 -2
  12. package/dist/complexities/connection.complexity.js +0 -9
  13. package/dist/complexities/connection.complexity.js.map +0 -1
  14. package/dist/complexities/index.d.ts +0 -1
  15. package/dist/complexities/index.js +0 -18
  16. package/dist/complexities/index.js.map +0 -1
  17. package/dist/decorators/complexity.decorator.d.ts +0 -5
  18. package/dist/decorators/complexity.decorator.js +0 -8
  19. package/dist/decorators/complexity.decorator.js.map +0 -1
  20. package/dist/decorators/index.d.ts +0 -1
  21. package/dist/decorators/index.js +0 -18
  22. package/dist/decorators/index.js.map +0 -1
  23. package/dist/interfaces/cost-response.interface.d.ts +0 -10
  24. package/dist/interfaces/cost-response.interface.js +0 -3
  25. package/dist/interfaces/cost-response.interface.js.map +0 -1
  26. package/dist/interfaces/edge.interface.d.ts +0 -4
  27. package/dist/interfaces/edge.interface.js +0 -3
  28. package/dist/interfaces/edge.interface.js.map +0 -1
  29. package/dist/interfaces/graphql-module-options.interface.d.ts +0 -21
  30. package/dist/interfaces/graphql-module-options.interface.js.map +0 -1
  31. package/dist/interfaces/index.d.ts +0 -3
  32. package/dist/interfaces/index.js +0 -20
  33. package/dist/interfaces/index.js.map +0 -1
  34. package/dist/plugins/complexity.plugin.d.ts +0 -21
  35. package/dist/plugins/complexity.plugin.js +0 -246
  36. package/dist/plugins/complexity.plugin.js.map +0 -1
  37. package/dist/plugins/index.d.ts +0 -1
  38. package/dist/plugins/index.js +0 -18
  39. package/dist/plugins/index.js.map +0 -1
  40. package/dist/plugins/logging.plugin.d.ts +0 -7
  41. package/dist/plugins/logging.plugin.js +0 -48
  42. package/dist/plugins/logging.plugin.js.map +0 -1
  43. /package/dist/{interfaces/graphql-module-options.interface.js → graphql-module-options.interface.js} +0 -0
@@ -0,0 +1,2 @@
1
+ import { type ApolloDriverConfig } from "@nestjs/apollo";
2
+ export type GraphQLModuleOptions = ApolloDriverConfig;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-module-options.interface.js","sourceRoot":"","sources":["../src/graphql-module-options.interface.ts"],"names":[],"mappings":""}
@@ -1,3 +1,2 @@
1
- import { type GraphQLModuleOptions } from "./interfaces";
2
1
  export declare const MODULE_OPTIONS_TOKEN: unique symbol;
3
- export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<GraphQLModuleOptions, "forRoot", "create", {}>, BASE_MODULE_OPTIONS_TOKEN: string | symbol;
2
+ export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<import("@nestjs/apollo").ApolloDriverConfig, "forRoot", "create", {}>, BASE_MODULE_OPTIONS_TOKEN: string | symbol;
@@ -7,15 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.GraphQLModule = void 0;
10
- const default_1 = require("@apollo/server/plugin/landingPage/default");
11
10
  const apollo_1 = require("@nestjs/apollo");
12
11
  const common_1 = require("@nestjs/common");
13
12
  const core_1 = require("@nestjs/core");
14
13
  const graphql_1 = require("@nestjs/graphql");
15
14
  const graphql_exception_filter_1 = require("./graphql.exception-filter");
16
15
  const graphql_module_definition_1 = require("./graphql.module-definition");
17
- const plugins_1 = require("./plugins");
18
- const logging_plugin_1 = require("./plugins/logging.plugin");
19
16
  let GraphQLModule = class GraphQLModule extends graphql_module_definition_1.ConfigurableModuleClass {
20
17
  };
21
18
  exports.GraphQLModule = GraphQLModule;
@@ -27,34 +24,18 @@ exports.GraphQLModule = GraphQLModule = __decorate([
27
24
  driver: apollo_1.ApolloDriver,
28
25
  inject: [graphql_module_definition_1.MODULE_OPTIONS_TOKEN],
29
26
  useFactory: (options) => {
30
- if (options.playground !== false) {
31
- options.playground = false;
32
- options.plugins = [
33
- ...(options.plugins ?? []),
34
- (0, default_1.ApolloServerPluginLandingPageLocalDefault)({
35
- includeCookies: true,
36
- }),
37
- ];
38
- }
39
27
  return {
40
28
  path: "/api/graphql",
41
- autoSchemaFile: true,
29
+ autoSchemaFile: "schema.gql",
30
+ sortSchema: true,
31
+ graphiql: process.env.NODE_ENV !== "production",
42
32
  ...options,
43
- ...(typeof options.subscriptions !== "undefined"
44
- ? {
45
- subscriptions: {
46
- "graphql-ws": options.subscriptions,
47
- },
48
- }
49
- : {}),
50
33
  };
51
34
  },
52
35
  }),
53
36
  ],
54
37
  providers: [
55
38
  common_1.Logger,
56
- plugins_1.ComplexityPlugin,
57
- logging_plugin_1.LoggingPlugin,
58
39
  {
59
40
  provide: core_1.APP_FILTER,
60
41
  useClass: graphql_exception_filter_1.GraphQLExceptionFilter,
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.module.js","sourceRoot":"","sources":["../src/graphql.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uEAAsG;AACtG,2CAA8C;AAC9C,2CAAwD;AACxD,uCAA0C;AAC1C,6CAAqE;AAErE,yEAAoE;AACpE,2EAIqC;AAErC,uCAA6C;AAC7C,6DAAyD;AAkDlD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,mDAAuB;CAAG,CAAA;AAAhD,sCAAa;wBAAb,aAAa;IAhDzB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAiB,CAAC,YAAY,CAAC;gBAC7B,MAAM,EAAE,qBAAY;gBACpB,MAAM,EAAE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AAc,SAAQ,mDAAuB;CAAG,CAAA;AAAhD,sCAAa;wBAAb,aAAa;IA/BzB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAiB,CAAC,YAAY,CAAC;gBAC7B,MAAM,EAAE,qBAAY;gBACpB,MAAM,EAAE,CAAC,gDAAoB,CAAC;gBAC9B,UAAU,EAAE,CAAC,OAA6B,EAAE,EAAE;oBAC5C,OAAO;wBACL,IAAI,EAAE,cAAc;wBACpB,cAAc,EAAE,YAAY;wBAC5B,UAAU,EAAE,IAAI;wBAChB,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;wBAC/C,GAAG,OAAO;qBACX,CAAC;gBACJ,CAAC;aACF,CAAC;SACH;QACD,SAAS,EAAE;YACT,eAAM;YACN;gBACE,OAAO,EAAE,iBAAU;gBACnB,QAAQ,EAAE,iDAAsB;aACjC;YACD;gBACE,OAAO,EAAE,gDAAoB;gBAC7B,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,qDAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBAC9D,UAAU,EAAE,CAAC,UAAgC,EAAE,EAAE,EAAE,CAAC,OAAO;aAC5D;SACF;QACD,OAAO,EAAE,CAAC,gDAAoB,CAAC;KAChC,CAAC;GACW,aAAa,CAAmC"}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,5 @@
1
- export * from "./complexities";
2
- export { Complexity } from "./decorators";
3
- export * from "./decorators";
4
1
  export * from "./graphql.exception-filter";
5
2
  export { GraphQLModule } from "./graphql.module";
6
- export * from "./graphql.module";
7
- export * from "./interfaces";
8
- export * from "./plugins";
9
3
  export { Plugin } from "@nestjs/apollo";
10
4
  export { BuildSchemaOptions } from "@nestjs/graphql";
11
5
  export * from "@nestjs/graphql";
package/dist/index.js CHANGED
@@ -14,17 +14,10 @@ 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
- exports.Plugin = exports.GraphQLModule = exports.Complexity = void 0;
18
- __exportStar(require("./complexities"), exports);
19
- var decorators_1 = require("./decorators");
20
- Object.defineProperty(exports, "Complexity", { enumerable: true, get: function () { return decorators_1.Complexity; } });
21
- __exportStar(require("./decorators"), exports);
17
+ exports.Plugin = exports.GraphQLModule = void 0;
22
18
  __exportStar(require("./graphql.exception-filter"), exports);
23
19
  var graphql_module_1 = require("./graphql.module");
24
20
  Object.defineProperty(exports, "GraphQLModule", { enumerable: true, get: function () { return graphql_module_1.GraphQLModule; } });
25
- __exportStar(require("./graphql.module"), exports);
26
- __exportStar(require("./interfaces"), exports);
27
- __exportStar(require("./plugins"), exports);
28
21
  var apollo_1 = require("@nestjs/apollo");
29
22
  Object.defineProperty(exports, "Plugin", { enumerable: true, get: function () { return apollo_1.Plugin; } });
30
23
  __exportStar(require("@nestjs/graphql"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA6B;AAC7B,6DAA2C;AAC3C,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,mDAAiC;AACjC,+CAA6B;AAC7B,4CAA0B;AAC1B,yCAAwC;AAA/B,gGAAA,MAAM,OAAA;AAEf,kDAAgC;AAChC,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,yCAAwC;AAA/B,gGAAA,MAAM,OAAA;AAEf,kDAAgC;AAChC,0CAAwB"}