UNPKG

1.74 kBTypeScriptView Raw
1import { GraphQLSchema } from 'graphql';
2import { GraphQLSchemaBuilder } from '../graphql-schema.builder';
3import { GraphQLSchemaHost } from '../graphql-schema.host';
4import { AutoSchemaFileValue, BuildFederatedSchemaOptions, GqlModuleOptions } from '../interfaces';
5import { ResolversExplorerService, ScalarsExplorerService } from '../services';
6import { TypeDefsDecoratorFactory } from './type-defs-decorator.factory';
7export declare class GraphQLFederationFactory {
8 private readonly resolversExplorerService;
9 private readonly scalarsExplorerService;
10 private readonly gqlSchemaBuilder;
11 private readonly gqlSchemaHost;
12 private readonly typeDefsDecoratorFactory;
13 constructor(resolversExplorerService: ResolversExplorerService, scalarsExplorerService: ScalarsExplorerService, gqlSchemaBuilder: GraphQLSchemaBuilder, gqlSchemaHost: GraphQLSchemaHost, typeDefsDecoratorFactory: TypeDefsDecoratorFactory);
14 mergeWithSchema<T extends GqlModuleOptions>(options?: T, buildFederatedSchema?: (options: BuildFederatedSchemaOptions) => GraphQLSchema): Promise<T>;
15 private buildSchemaFromTypeDefs;
16 private generateSchema;
17 private getResolvers;
18 private extendResolvers;
19 private overrideOrExtendResolvers;
20 /**
21 * Ensures that the resolveType method for unions and interfaces in the federated schema
22 * is properly set from the one in the autoGeneratedSchema.
23 */
24 private overrideFederatedResolveType;
25 buildFederatedSchema<T extends GqlModuleOptions>(autoSchemaFile: AutoSchemaFileValue, options: T, resolvers: Function[]): Promise<GraphQLSchema>;
26 private getFederationVersionAndConfig;
27 private loadFederationDirectives;
28}
29//# sourceMappingURL=graphql-federation.factory.d.ts.map
\No newline at end of file