UNPKG

1.26 kBTypeScriptView Raw
1import { DirectiveNode, GraphQLSchema, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, UnionTypeDefinitionNode, UnionTypeExtensionNode } from 'graphql';
2import { ASTVisitFn } from '../gql16types';
3import { ServiceDefinition } from './types';
4export declare type DirectiveUsages = Map<string, DirectiveNode[]>;
5declare type DirectiveUsagesPerField = Map<string, DirectiveUsages>;
6declare type DirectiveUsagesPerType = Map<string, {
7 directives: DirectiveUsages;
8 fields: DirectiveUsagesPerField;
9}>;
10declare type DirectiveUsagesPerSubgraph = Map<string, DirectiveUsagesPerType>;
11declare type ObjectInterfaceOrUnionTypeNode = ObjectTypeDefinitionNode | ObjectTypeExtensionNode | InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | UnionTypeDefinitionNode | UnionTypeExtensionNode;
12export declare class DirectiveMetadata {
13 directiveUsagesPerSubgraph: DirectiveUsagesPerSubgraph;
14 constructor(subgraphs: ServiceDefinition[]);
15 getTypeVisitor(subgraphName: string): ASTVisitFn<ObjectInterfaceOrUnionTypeNode>;
16 hasUsages(directiveName: string): boolean;
17 applyMetadataToSupergraphSchema(schema: GraphQLSchema): void;
18}
19export {};
20//# sourceMappingURL=DirectiveMetadata.d.ts.map
\No newline at end of file