@nestjs/apollo 9.2.1 → 9.2.6

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.
@@ -2,5 +2,6 @@ import { ApolloGatewayDriverConfig } from '../interfaces';
2
2
  import { ApolloBaseDriver } from './apollo-base.driver';
3
3
  export declare class ApolloGatewayDriver extends ApolloBaseDriver<ApolloGatewayDriverConfig> {
4
4
  start(options: ApolloGatewayDriverConfig): Promise<void>;
5
+ mergeDefaultOptions(options: Record<string, any>): Promise<Record<string, any>>;
5
6
  }
6
7
  //# sourceMappingURL=apollo-gateway.driver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apollo-gateway.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo-gateway.driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBACa,mBAAoB,SAAQ,gBAAgB,CAAC,yBAAyB,CAAC;IACrE,KAAK,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;CActE"}
1
+ {"version":3,"file":"apollo-gateway.driver.d.ts","sourceRoot":"","sources":["../../lib/drivers/apollo-gateway.driver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,qBACa,mBAAoB,SAAQ,gBAAgB,CAAC,yBAAyB,CAAC;IACrE,KAAK,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAexD,mBAAmB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC3B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAMhC"}
@@ -15,6 +15,13 @@ let ApolloGatewayDriver = class ApolloGatewayDriver extends apollo_base_driver_1
15
15
  gateway,
16
16
  });
17
17
  }
18
+ async mergeDefaultOptions(options) {
19
+ var _a;
20
+ return {
21
+ ...options,
22
+ server: await super.mergeDefaultOptions((_a = options === null || options === void 0 ? void 0 : options.server) !== null && _a !== void 0 ? _a : {}),
23
+ };
24
+ }
18
25
  };
19
26
  ApolloGatewayDriver = (0, tslib_1.__decorate)([
20
27
  (0, common_1.Injectable)()
@@ -0,0 +1,5 @@
1
+ import { ApolloDriverAsyncConfig, ApolloDriverConfig, ApolloDriverConfigFactory } from './apollo-driver-config.interface';
2
+ export declare type ApolloFederationDriverConfig = ApolloDriverConfig;
3
+ export declare type ApolloFederationDriverConfigFactory = ApolloDriverConfigFactory;
4
+ export declare type ApolloFederationDriverAsyncConfig = ApolloDriverAsyncConfig;
5
+ //# sourceMappingURL=apollo-federation-driver-config.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-federation-driver-config.interface.d.ts","sourceRoot":"","sources":["../../lib/interfaces/apollo-federation-driver-config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAE1C,oBAAY,4BAA4B,GAAG,kBAAkB,CAAC;AAC9D,oBAAY,mCAAmC,GAAG,yBAAyB,CAAC;AAC5E,oBAAY,iCAAiC,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,20 @@
1
1
  import { GatewayConfig } from '@apollo/gateway';
2
- import { GqlModuleAsyncOptions, GqlModuleOptions, GqlOptionsFactory } from '@nestjs/graphql';
3
- export interface ApolloGatewayDriverConfig {
2
+ import { Type } from '@nestjs/common';
3
+ import { GqlModuleAsyncOptions, GqlOptionsFactory, GraphQLDriver } from '@nestjs/graphql';
4
+ import { ApolloDriverConfig } from './apollo-driver-config.interface';
5
+ export interface ApolloGatewayDriverConfig<TDriver extends GraphQLDriver = any> {
6
+ /**
7
+ * GraphQL gateway adapter
8
+ */
9
+ driver?: Type<TDriver>;
10
+ /**
11
+ * Gateway configuration
12
+ */
4
13
  gateway?: GatewayConfig;
5
- server?: Omit<GqlModuleOptions, 'typeDefs' | 'typePaths' | 'include' | 'resolvers' | 'resolverValidationOptions' | 'directiveResolvers' | 'autoSchemaFile' | 'transformSchema' | 'definitions' | 'schema' | 'subscriptions' | 'buildSchemaOptions' | 'fieldResolverEnhancers' | 'driver'>;
14
+ /**
15
+ * Server configuration
16
+ */
17
+ server?: Omit<ApolloDriverConfig, 'typeDefs' | 'typePaths' | 'include' | 'resolvers' | 'resolverValidationOptions' | 'directiveResolvers' | 'autoSchemaFile' | 'transformSchema' | 'definitions' | 'schema' | 'subscriptions' | 'buildSchemaOptions' | 'fieldResolverEnhancers' | 'driver'>;
6
18
  }
7
19
  export declare type ApolloGatewayDriverConfigFactory = GqlOptionsFactory<ApolloGatewayDriverConfig>;
8
20
  export declare type ApolloGatewayDriverAsyncConfig = GqlModuleAsyncOptions<ApolloGatewayDriverConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"apollo-gateway-driver-config.interface.d.ts","sourceRoot":"","sources":["../../lib/interfaces/apollo-gateway-driver-config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,IAAI,CACX,gBAAgB,EACd,UAAU,GACV,WAAW,GACX,SAAS,GACT,WAAW,GACX,2BAA2B,GAC3B,oBAAoB,GACpB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,QAAQ,GACR,eAAe,GACf,oBAAoB,GACpB,wBAAwB,GACxB,QAAQ,CACX,CAAC;CACH;AAED,oBAAY,gCAAgC,GAC1C,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;AAC/C,oBAAY,8BAA8B,GACxC,qBAAqB,CAAC,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"apollo-gateway-driver-config.interface.d.ts","sourceRoot":"","sources":["../../lib/interfaces/apollo-gateway-driver-config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,MAAM,WAAW,yBAAyB,CACxC,OAAO,SAAS,aAAa,GAAG,GAAG;IAEnC;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CACX,kBAAkB,EAChB,UAAU,GACV,WAAW,GACX,SAAS,GACT,WAAW,GACX,2BAA2B,GAC3B,oBAAoB,GACpB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,QAAQ,GACR,eAAe,GACf,oBAAoB,GACpB,wBAAwB,GACxB,QAAQ,CACX,CAAC;CACH;AAED,oBAAY,gCAAgC,GAC1C,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;AAC/C,oBAAY,8BAA8B,GACxC,qBAAqB,CAAC,yBAAyB,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './apollo-driver-config.interface';
2
+ export * from './apollo-federation-driver-config.interface';
2
3
  export * from './apollo-gateway-driver-config.interface';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC"}
@@ -2,4 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  (0, tslib_1.__exportStar)(require("./apollo-driver-config.interface"), exports);
5
+ (0, tslib_1.__exportStar)(require("./apollo-federation-driver-config.interface"), exports);
5
6
  (0, tslib_1.__exportStar)(require("./apollo-gateway-driver-config.interface"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/apollo",
3
- "version": "9.2.1",
3
+ "version": "9.2.6",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@apollo)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",