@nestjs/apollo 10.1.7 → 10.2.1
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.
- package/dist/constants/apollo.constants.d.ts +2 -0
- package/dist/constants/apollo.constants.d.ts.map +1 -0
- package/dist/constants/apollo.constants.js +4 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +4 -0
- package/dist/errors/authentication.error.d.ts +11 -0
- package/dist/errors/authentication.error.d.ts.map +1 -0
- package/dist/errors/authentication.error.js +22 -0
- package/dist/errors/forbidden.error.d.ts +11 -0
- package/dist/errors/forbidden.error.d.ts.map +1 -0
- package/dist/errors/forbidden.error.js +22 -0
- package/dist/errors/index.d.ts +5 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +7 -0
- package/dist/errors/user-input.error.d.ts +11 -0
- package/dist/errors/user-input.error.d.ts.map +1 -0
- package/dist/errors/user-input.error.js +23 -0
- package/dist/errors/validation.error.d.ts +11 -0
- package/dist/errors/validation.error.d.ts.map +1 -0
- package/dist/errors/validation.error.js +23 -0
- package/dist/interfaces/apollo-driver-config.interface.d.ts +2 -2
- package/dist/interfaces/apollo-driver-config.interface.d.ts.map +1 -1
- package/dist/interfaces/apollo-federation-driver-config.interface.d.ts +3 -3
- package/dist/interfaces/apollo-federation-driver-config.interface.d.ts.map +1 -1
- package/dist/interfaces/apollo-gateway-driver-config.interface.d.ts +2 -2
- package/dist/interfaces/apollo-gateway-driver-config.interface.d.ts.map +1 -1
- package/dist/utils/async-iterator.util.d.ts +1 -2
- package/dist/utils/async-iterator.util.d.ts.map +1 -1
- package/dist/utils/async-iterator.util.js +29 -11
- package/package.json +9 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apollo.constants.d.ts","sourceRoot":"","sources":["../../lib/constants/apollo.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GraphQLError, GraphQLErrorOptions } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown when the user is not authenticated.
|
|
4
|
+
*
|
|
5
|
+
* "AuthenticationError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
6
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AuthenticationError extends GraphQLError {
|
|
9
|
+
constructor(message: string, options?: GraphQLErrorOptions);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=authentication.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.error.d.ts","sourceRoot":"","sources":["../../lib/errors/authentication.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;gBACvC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;CAS3D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthenticationError = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown when the user is not authenticated.
|
|
7
|
+
*
|
|
8
|
+
* "AuthenticationError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
9
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
10
|
+
*/
|
|
11
|
+
class AuthenticationError extends graphql_1.GraphQLError {
|
|
12
|
+
constructor(message, options) {
|
|
13
|
+
super(message, {
|
|
14
|
+
...options,
|
|
15
|
+
extensions: {
|
|
16
|
+
code: 'UNAUTHENTICATED',
|
|
17
|
+
...options === null || options === void 0 ? void 0 : options.extensions,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.AuthenticationError = AuthenticationError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GraphQLError, GraphQLErrorOptions } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown when the user is not authorized to access a resource.
|
|
4
|
+
*
|
|
5
|
+
* "ForbiddenError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
6
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ForbiddenError extends GraphQLError {
|
|
9
|
+
constructor(message: string, options?: GraphQLErrorOptions);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=forbidden.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden.error.d.ts","sourceRoot":"","sources":["../../lib/errors/forbidden.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,YAAY;gBAClC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;CAS3D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForbiddenError = void 0;
|
|
4
|
+
const graphql_1 = require("graphql");
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown when the user is not authorized to access a resource.
|
|
7
|
+
*
|
|
8
|
+
* "ForbiddenError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
9
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
10
|
+
*/
|
|
11
|
+
class ForbiddenError extends graphql_1.GraphQLError {
|
|
12
|
+
constructor(message, options) {
|
|
13
|
+
super(message, {
|
|
14
|
+
...options,
|
|
15
|
+
extensions: {
|
|
16
|
+
code: 'FORBIDDEN',
|
|
17
|
+
...options === null || options === void 0 ? void 0 : options.extensions,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ForbiddenError = ForbiddenError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./authentication.error"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./forbidden.error"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./user-input.error"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./validation.error"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GraphQLError, GraphQLErrorOptions } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown when the user input is invalid.
|
|
4
|
+
*
|
|
5
|
+
* "UserInputError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
6
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
7
|
+
*/
|
|
8
|
+
export declare class UserInputError extends GraphQLError {
|
|
9
|
+
constructor(message: string, options?: GraphQLErrorOptions);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=user-input.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-input.error.d.ts","sourceRoot":"","sources":["../../lib/errors/user-input.error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,YAAY;gBAClC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;CAS3D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserInputError = void 0;
|
|
4
|
+
const errors_1 = require("@apollo/server/errors");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
/**
|
|
7
|
+
* This error is thrown when the user input is invalid.
|
|
8
|
+
*
|
|
9
|
+
* "UserInputError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
10
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
11
|
+
*/
|
|
12
|
+
class UserInputError extends graphql_1.GraphQLError {
|
|
13
|
+
constructor(message, options) {
|
|
14
|
+
super(message, {
|
|
15
|
+
...options,
|
|
16
|
+
extensions: {
|
|
17
|
+
code: errors_1.ApolloServerErrorCode.BAD_USER_INPUT,
|
|
18
|
+
...options === null || options === void 0 ? void 0 : options.extensions,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.UserInputError = UserInputError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GraphQLError, GraphQLErrorOptions } from 'graphql';
|
|
2
|
+
/**
|
|
3
|
+
* This error is thrown when the user input does not pass validation.
|
|
4
|
+
*
|
|
5
|
+
* "ValidationError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
6
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ValidationError extends GraphQLError {
|
|
9
|
+
constructor(message: string, options?: GraphQLErrorOptions);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=validation.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.error.d.ts","sourceRoot":"","sources":["../../lib/errors/validation.error.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,YAAY;gBACnC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;CAS3D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidationError = void 0;
|
|
4
|
+
const errors_1 = require("@apollo/server/errors");
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
/**
|
|
7
|
+
* This error is thrown when the user input does not pass validation.
|
|
8
|
+
*
|
|
9
|
+
* "ValidationError" class was removed in the latest version of Apollo Server (4.0.0)
|
|
10
|
+
* It was moved to the @nestjs/apollo package to avoid regressions & make migration easier.
|
|
11
|
+
*/
|
|
12
|
+
class ValidationError extends graphql_1.GraphQLError {
|
|
13
|
+
constructor(message, options) {
|
|
14
|
+
super(message, {
|
|
15
|
+
...options,
|
|
16
|
+
extensions: {
|
|
17
|
+
code: errors_1.ApolloServerErrorCode.GRAPHQL_VALIDATION_FAILED,
|
|
18
|
+
...options === null || options === void 0 ? void 0 : options.extensions,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ValidationError = ValidationError;
|
|
@@ -47,6 +47,6 @@ export interface ApolloDriverConfig extends Omit<Config, 'typeDefs'>, ServerRegi
|
|
|
47
47
|
*/
|
|
48
48
|
autoTransformHttpErrors?: boolean;
|
|
49
49
|
}
|
|
50
|
-
export
|
|
51
|
-
export
|
|
50
|
+
export type ApolloDriverConfigFactory = GqlOptionsFactory<ApolloDriverConfig>;
|
|
51
|
+
export type ApolloDriverAsyncConfig = GqlModuleAsyncOptions<ApolloDriverConfig>;
|
|
52
52
|
//# sourceMappingURL=apollo-driver-config.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apollo-driver-config.interface.d.ts","sourceRoot":"","sources":["../../lib/interfaces/apollo-driver-config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qDAAqD,EACrD,MAAM,EACN,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC;IAEjC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9B,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,eAAe,CAAC,EAAE,CAChB,MAAM,EAAE,aAAa,KAClB,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEhD;;OAEG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,qDAAqD,CAAC;IAE7E;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,
|
|
1
|
+
{"version":3,"file":"apollo-driver-config.interface.d.ts","sourceRoot":"","sources":["../../lib/interfaces/apollo-driver-config.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qDAAqD,EACrD,MAAM,EACN,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC;IAEjC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9B,kBAAkB,EAClB,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,eAAe,CAAC,EAAE,CAChB,MAAM,EAAE,aAAa,KAClB,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEhD;;OAEG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,qDAAqD,CAAC;IAE7E;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAC9E,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApolloDriverAsyncConfig, ApolloDriverConfig, ApolloDriverConfigFactory } from './apollo-driver-config.interface';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type ApolloFederationDriverConfig = ApolloDriverConfig;
|
|
3
|
+
export type ApolloFederationDriverConfigFactory = ApolloDriverConfigFactory;
|
|
4
|
+
export type ApolloFederationDriverAsyncConfig = ApolloDriverAsyncConfig;
|
|
5
5
|
//# sourceMappingURL=apollo-federation-driver-config.interface.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC;AAC9D,MAAM,MAAM,mCAAmC,GAAG,yBAAyB,CAAC;AAC5E,MAAM,MAAM,iCAAiC,GAAG,uBAAuB,CAAC"}
|
|
@@ -16,6 +16,6 @@ export interface ApolloGatewayDriverConfig<TDriver extends GraphQLDriver = any>
|
|
|
16
16
|
*/
|
|
17
17
|
server?: Omit<ApolloDriverConfig, 'typeDefs' | 'typePaths' | 'include' | 'resolvers' | 'resolverValidationOptions' | 'directiveResolvers' | 'autoSchemaFile' | 'transformSchema' | 'definitions' | 'schema' | 'subscriptions' | 'buildSchemaOptions' | 'fieldResolverEnhancers' | 'driver'>;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
export
|
|
19
|
+
export type ApolloGatewayDriverConfigFactory = GqlOptionsFactory<ApolloGatewayDriverConfig>;
|
|
20
|
+
export type ApolloGatewayDriverAsyncConfig = GqlModuleAsyncOptions<ApolloGatewayDriverConfig>;
|
|
21
21
|
//# sourceMappingURL=apollo-gateway-driver-config.interface.d.ts.map
|
|
@@ -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,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,
|
|
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,MAAM,MAAM,gCAAgC,GAC1C,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;AAC/C,MAAM,MAAM,8BAA8B,GACxC,qBAAqB,CAAC,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { $$asyncIterator } from 'iterall';
|
|
2
|
-
|
|
2
|
+
export type AsyncIterator<T> = {
|
|
3
3
|
next(value?: any): Promise<IteratorResult<T>>;
|
|
4
4
|
return(): any;
|
|
5
5
|
throw(error: any): any;
|
|
6
6
|
[$$asyncIterator]: any;
|
|
7
7
|
};
|
|
8
8
|
export declare const createAsyncIterator: <T = any>(lazyFactory: Promise<AsyncIterator<T>>, filterFn: Function) => Promise<AsyncIterator<T>>;
|
|
9
|
-
export {};
|
|
10
9
|
//# sourceMappingURL=async-iterator.util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-iterator.util.d.ts","sourceRoot":"","sources":["../../lib/utils/async-iterator.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"async-iterator.util.d.ts","sourceRoot":"","sources":["../../lib/utils/async-iterator.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAG,CAAC;IACd,KAAK,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC;IACvB,CAAC,eAAe,CAAC,EAAE,GAAG,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,8DAEpB,QAAQ,8BA2DnB,CAAC"}
|
|
@@ -4,17 +4,35 @@ exports.createAsyncIterator = void 0;
|
|
|
4
4
|
const iterall_1 = require("iterall");
|
|
5
5
|
const createAsyncIterator = async (lazyFactory, filterFn) => {
|
|
6
6
|
const asyncIterator = await lazyFactory;
|
|
7
|
-
const getNextValue =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
const getNextValue = () => {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
const inner = () => {
|
|
10
|
+
if (!asyncIterator || typeof asyncIterator.next !== 'function') {
|
|
11
|
+
reject(asyncIterator);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
asyncIterator
|
|
15
|
+
.next()
|
|
16
|
+
.then((payload) => {
|
|
17
|
+
if (payload.done === true) {
|
|
18
|
+
resolve(payload);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
Promise.resolve(filterFn(payload.value))
|
|
22
|
+
.catch(() => false)
|
|
23
|
+
.then((result) => {
|
|
24
|
+
if (result === true) {
|
|
25
|
+
resolve(payload);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
inner();
|
|
29
|
+
return;
|
|
30
|
+
});
|
|
31
|
+
})
|
|
32
|
+
.catch(reject);
|
|
33
|
+
};
|
|
34
|
+
inner();
|
|
35
|
+
});
|
|
18
36
|
};
|
|
19
37
|
return {
|
|
20
38
|
next() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/apollo",
|
|
3
|
-
"version": "10.1
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@apollo)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@apollo/gateway": "0.54.1",
|
|
27
|
-
"@apollo/gateway-v2": "npm:@apollo/gateway@2.
|
|
28
|
-
"@apollo/subgraph-v2": "npm:@apollo/subgraph@2.
|
|
27
|
+
"@apollo/gateway-v2": "npm:@apollo/gateway@2.3.1",
|
|
28
|
+
"@apollo/subgraph-v2": "npm:@apollo/subgraph@2.3.1",
|
|
29
29
|
"@nestjs/common": "8.4.7",
|
|
30
30
|
"@nestjs/core": "8.4.7",
|
|
31
31
|
"@nestjs/platform-express": "8.4.7",
|
|
@@ -43,10 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"iterall": "1.3.0",
|
|
45
45
|
"lodash.omit": "4.5.0",
|
|
46
|
-
"tslib": "2.
|
|
46
|
+
"tslib": "2.5.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@apollo/gateway": "^0.44.1 || ^0.46.0 || ^0.48.0 || ^0.49.0 || ^0.50.0 || ^2.0.0",
|
|
50
|
+
"@apollo/subgraph": "^2.0.0",
|
|
50
51
|
"@nestjs/common": "^8.2.3 || ^9.0.0",
|
|
51
52
|
"@nestjs/core": "^8.2.3 || ^9.0.0",
|
|
52
53
|
"@nestjs/graphql": "^10.0.0",
|
|
@@ -59,6 +60,9 @@
|
|
|
59
60
|
"@apollo/gateway": {
|
|
60
61
|
"optional": true
|
|
61
62
|
},
|
|
63
|
+
"@apollo/subgraph": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
62
66
|
"apollo-server-core": {
|
|
63
67
|
"optional": true
|
|
64
68
|
},
|
|
@@ -69,5 +73,5 @@
|
|
|
69
73
|
"optional": true
|
|
70
74
|
}
|
|
71
75
|
},
|
|
72
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "df98fb8f81da2bbe4443b25d2ff920eb23391487"
|
|
73
77
|
}
|