UNPKG

@apollo/federation

Version:
20 lines 1.26 kB
import { DirectiveNode, GraphQLSchema, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, UnionTypeDefinitionNode, UnionTypeExtensionNode } from 'graphql'; import { ASTVisitFn } from '../gql16types'; import { ServiceDefinition } from './types'; export declare type DirectiveUsages = Map<string, DirectiveNode[]>; declare type DirectiveUsagesPerField = Map<string, DirectiveUsages>; declare type DirectiveUsagesPerType = Map<string, { directives: DirectiveUsages; fields: DirectiveUsagesPerField; }>; declare type DirectiveUsagesPerSubgraph = Map<string, DirectiveUsagesPerType>; declare type ObjectInterfaceOrUnionTypeNode = ObjectTypeDefinitionNode | ObjectTypeExtensionNode | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | UnionTypeDefinitionNode | UnionTypeExtensionNode; export declare class DirectiveMetadata { directiveUsagesPerSubgraph: DirectiveUsagesPerSubgraph; constructor(subgraphs: ServiceDefinition[]); getTypeVisitor(subgraphName: string): ASTVisitFn<ObjectInterfaceOrUnionTypeNode>; hasUsages(directiveName: string): boolean; applyMetadataToSupergraphSchema(schema: GraphQLSchema): void; } export {}; //# sourceMappingURL=DirectiveMetadata.d.ts.map