UNPKG

1.15 kBTypeScriptView Raw
1import { GraphQLNamedType, GraphQLResolveInfo, GraphQLSchema } from 'graphql';
2declare type GraphQLReferenceResolver<TContext> = (reference: object, context: TContext, info: GraphQLResolveInfo) => any;
3interface ApolloSubgraphExtensions<TContext> {
4 resolveReference?: GraphQLReferenceResolver<TContext>;
5}
6declare module 'graphql/type/definition' {
7 interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {
8 apollo?: {
9 subgraph?: ApolloSubgraphExtensions<_TContext>;
10 };
11 }
12 interface GraphQLInterfaceTypeExtensions<_TSource = any, _TContext = any> {
13 apollo?: {
14 subgraph?: ApolloSubgraphExtensions<_TContext>;
15 };
16 }
17 interface GraphQLUnionTypeExtensions<_TSource = any, _TContext = any> {
18 apollo?: {
19 subgraph?: ApolloSubgraphExtensions<_TContext>;
20 };
21 }
22}
23declare type TypeTransformer = (type: GraphQLNamedType) => GraphQLNamedType | null | undefined;
24export declare function transformSchema(schema: GraphQLSchema, transformType: TypeTransformer): GraphQLSchema;
25export {};
26//# sourceMappingURL=transform-schema.util.d.ts.map
\No newline at end of file