UNPKG

946 BTypeScriptView Raw
1import { GraphQLSchema } from 'graphql';
2import { DirectableObject } from './getDirectiveExtensions.js';
3export interface DirectiveAnnotation {
4 name: string;
5 args?: Record<string, any>;
6}
7export type DirectableGraphQLObject = DirectableObject;
8export declare function getDirectivesInExtensions(node: DirectableGraphQLObject, pathToDirectivesInExtensions?: string[]): Array<DirectiveAnnotation>;
9export declare function getDirectiveInExtensions(node: DirectableGraphQLObject, directiveName: string, pathToDirectivesInExtensions?: string[]): Array<Record<string, any>> | undefined;
10export declare function getDirectives(schema: GraphQLSchema, node: DirectableGraphQLObject, pathToDirectivesInExtensions?: string[]): Array<DirectiveAnnotation>;
11export declare function getDirective(schema: GraphQLSchema, node: DirectableGraphQLObject, directiveName: string, pathToDirectivesInExtensions?: string[]): Array<Record<string, any>> | undefined;