1 | import Maybe from '../tsutils/Maybe';
|
2 | import { GraphQLFieldConfigArgumentMap, GraphQLArgument } from './definition';
|
3 | import { DirectiveDefinitionNode } from '../language/ast';
|
4 | import { DirectiveLocationEnum } from '../language/directiveLocation';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export function isDirective(directive: any): directive is GraphQLDirective;
|
10 | export function assertDirective(directive: any): GraphQLDirective;
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export class GraphQLDirective {
|
16 | name: string;
|
17 | description: Maybe<string>;
|
18 | locations: DirectiveLocationEnum[];
|
19 | isRepeatable: boolean;
|
20 | args: GraphQLArgument[];
|
21 | extensions?: Maybe<Readonly<Record<string, any>>>;
|
22 | astNode: Maybe<DirectiveDefinitionNode>;
|
23 |
|
24 | constructor(config: GraphQLDirectiveConfig);
|
25 |
|
26 | toString(): string;
|
27 |
|
28 | toConfig(): GraphQLDirectiveConfig & {
|
29 | args: GraphQLFieldConfigArgumentMap;
|
30 | extensions?: Maybe<Readonly<Record<string, any>>>;
|
31 | isRepeatable: boolean;
|
32 | };
|
33 | }
|
34 |
|
35 | export interface GraphQLDirectiveConfig {
|
36 | name: string;
|
37 | description?: Maybe<string>;
|
38 | locations: DirectiveLocationEnum[];
|
39 | args?: Maybe<GraphQLFieldConfigArgumentMap>;
|
40 | isRepeatable?: Maybe<boolean>;
|
41 | extensions?: Maybe<Readonly<Record<string, any>>>;
|
42 | astNode?: Maybe<DirectiveDefinitionNode>;
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export const GraphQLIncludeDirective: GraphQLDirective;
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export const GraphQLSkipDirective: GraphQLDirective;
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | export const DEFAULT_DEPRECATION_REASON: 'No longer supported';
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | export const GraphQLDeprecatedDirective: GraphQLDirective;
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | export const specifiedDirectives: ReadonlyArray<GraphQLDirective>;
|
69 |
|
70 | export function isSpecifiedDirective(
|
71 | directive: any,
|
72 | ): directive is GraphQLDirective;
|