function loadSchema(schemaPointers, options) {
    return __awaiter(this, void 0, void 0, function () {
        var sources, _a, schemas, typeDefs, mergeSchemasOptions, schema;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0: return [4 /*yield*/, loadTypedefs(schemaPointers, __assign({ filterKinds: OPERATION_KINDS }, options))];
                case 1:
                    sources = _b.sent();
                    _a = collectSchemasAndTypeDefs(sources), schemas = _a.schemas, typeDefs = _a.typeDefs;
                    mergeSchemasOptions = __assign({ schemas: schemas,
                        typeDefs: typeDefs }, options);
                    return [4 /*yield*/, mergeSchemasAsync(mergeSchemasOptions)];
                case 2:
                    schema = _b.sent();
                    if (options === null || options === void 0 ? void 0 : options.includeSources) {
                        includeSources(schema, sources);
                    }
                    return [2 /*return*/, schema];
            }
        });
    });
}
/**
 * Asynchronously loads a schema from the provided pointers.
 * @param schemaPointers Pointers to the sources to load the schema from
 * @param options Additional options
 */
Asynchronously loads a schema from the provided pointers.
@param schemaPointers Pointers to the sources to load the schema from
@param options Additional options
Asynchronously loads a schema from the provided pointers . @param schemaPointers Pointers to the sources to load the schema from @param options Additional options
function loadSchema(schemaPointers, options) {
    return __awaiter(this, void 0, void 0, function () {
        var sources, _a, schemas, typeDefs, mergeSchemasOptions, schema;
        return __generator(this, function (_b) {
            switch (_b.label) {
                case 0: return [4 , loadTypedefs(schemaPointers, __assign({ filterKinds: OPERATION_KINDS }, options))];
                case 1:
                    sources = _b.sent();
                    _a = collectSchemasAndTypeDefs(sources), schemas = _a.schemas, typeDefs = _a.typeDefs;
                    mergeSchemasOptions = __assign({ schemas: schemas,
                        typeDefs: typeDefs }, options);
                    return [4 , mergeSchemasAsync(mergeSchemasOptions)];
                case 2:
                    schema = _b.sent();
                    if (options === null || options === void 0 ? void 0 : options.includeSources) {
                        includeSources(schema, sources);
                    }
                    return [2 , schema];
            }
        });
    });
}
function loadSchema ( schemaPointers , options ) { return __awaiter ( this , void 0 , void 0 , function ( ) { var sources , _a , schemas , typeDefs , mergeSchemasOptions , schema ; return __generator ( this , function ( _b ) { switch ( _b . label ) { case 0 : return [ 4 , loadTypedefs ( schemaPointers , __assign ( { filterKinds : OPERATION_KINDS } , options ) ) ] ; case 1 : sources = _b . sent ( ) ; _a = collectSchemasAndTypeDefs ( sources ) , schemas = _a . schemas , typeDefs = _a . typeDefs ; mergeSchemasOptions = __assign ( { schemas : schemas , typeDefs : typeDefs } , options ) ; return [ 4 , mergeSchemasAsync ( mergeSchemasOptions ) ] ; case 2 : schema = _b . sent ( ) ; if ( options === null || options === void 0 ? void 0 : options . includeSources ) { includeSources ( schema , sources ) ; } return [ 2 , schema ] ; } } ) ; } ) ; }
Asynchronously loads a schema from the provided pointers.
Asynchronously loads a schema from the provided pointers .
/*yield*/ /*yield*/ /*return*/