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