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