@graphql-tools/federation
Version:
Useful tools to create and manipulate GraphQL schemas.
33 lines (32 loc) • 2.17 kB
text/typescript
import { DocumentNode, GraphQLSchema } from 'graphql';
import { SubschemaConfig } from '@graphql-tools/delegate';
import { HTTPExecutorOptions } from '@graphql-tools/executor-http';
import { SubschemaConfigTransform } from '@graphql-tools/stitch';
import { Executor } from '@graphql-tools/utils';
export declare const SubgraphSDLQuery = "\n query SubgraphSDL {\n _service {\n sdl\n }\n }\n";
export declare function getSubschemaForFederationWithURL(config: HTTPExecutorOptions): Promise<SubschemaConfig>;
export declare function getSubschemaForFederationWithTypeDefs(typeDefs: DocumentNode): SubschemaConfig;
export declare function getSubschemaForFederationWithExecutor(executor: Executor): Promise<{
executor: Executor;
name?: string | undefined;
schema: GraphQLSchema;
createProxyingResolver?: import("@graphql-tools/delegate").CreateProxyingResolverFn<Record<string, any>> | undefined;
rootValue?: any;
transforms?: import("@graphql-tools/delegate").Transform<any, Record<string, any>>[] | undefined;
merge?: Record<string, import("@graphql-tools/delegate").MergedTypeConfig<any, any, Record<string, any>>> | undefined;
batch?: boolean | undefined;
batchingOptions?: import("@graphql-tools/delegate").BatchingOptions<any, any, any> | undefined;
}>;
export declare function getSubschemaForFederationWithSchema(schema: GraphQLSchema): Promise<{
executor: Executor;
name?: string | undefined;
schema: GraphQLSchema;
createProxyingResolver?: import("@graphql-tools/delegate").CreateProxyingResolverFn<Record<string, any>> | undefined;
rootValue?: any;
transforms?: import("@graphql-tools/delegate").Transform<any, Record<string, any>>[] | undefined;
merge?: Record<string, import("@graphql-tools/delegate").MergedTypeConfig<any, any, Record<string, any>>> | undefined;
batch?: boolean | undefined;
batchingOptions?: import("@graphql-tools/delegate").BatchingOptions<any, any, any> | undefined;
}>;
export declare function getStitchedSchemaWithUrls(configs: HTTPExecutorOptions[]): Promise<GraphQLSchema>;
export declare const federationSubschemaTransformer: SubschemaConfigTransform;