@apollo/federation-internals 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/__tests__/operations.test.ts +175 -10
- package/src/operations.ts +184 -36
- package/dist/Subgraph.d.ts +0 -1
- package/dist/Subgraph.d.ts.map +0 -1
- package/dist/Subgraph.js +0 -2
- package/dist/Subgraph.js.map +0 -1
- package/dist/argumentCompositionStrategies.d.ts +0 -34
- package/dist/argumentCompositionStrategies.d.ts.map +0 -1
- package/dist/argumentCompositionStrategies.js +0 -35
- package/dist/argumentCompositionStrategies.js.map +0 -1
- package/dist/buildSchema.d.ts +0 -10
- package/dist/buildSchema.d.ts.map +0 -1
- package/dist/buildSchema.js +0 -362
- package/dist/buildSchema.js.map +0 -1
- package/dist/coreSpec.d.ts +0 -127
- package/dist/coreSpec.d.ts.map +0 -1
- package/dist/coreSpec.js +0 -590
- package/dist/coreSpec.js.map +0 -1
- package/dist/debug.d.ts +0 -15
- package/dist/debug.d.ts.map +0 -1
- package/dist/debug.js +0 -122
- package/dist/debug.js.map +0 -1
- package/dist/definitions.d.ts +0 -663
- package/dist/definitions.d.ts.map +0 -1
- package/dist/definitions.js +0 -2841
- package/dist/definitions.js.map +0 -1
- package/dist/directiveAndTypeSpecification.d.ts +0 -67
- package/dist/directiveAndTypeSpecification.d.ts.map +0 -1
- package/dist/directiveAndTypeSpecification.js +0 -271
- package/dist/directiveAndTypeSpecification.js.map +0 -1
- package/dist/error.d.ts +0 -128
- package/dist/error.d.ts.map +0 -1
- package/dist/error.js +0 -315
- package/dist/error.js.map +0 -1
- package/dist/extractSubgraphsFromSupergraph.d.ts +0 -8
- package/dist/extractSubgraphsFromSupergraph.d.ts.map +0 -1
- package/dist/extractSubgraphsFromSupergraph.js +0 -576
- package/dist/extractSubgraphsFromSupergraph.js.map +0 -1
- package/dist/federation.d.ts +0 -175
- package/dist/federation.d.ts.map +0 -1
- package/dist/federation.js +0 -1414
- package/dist/federation.js.map +0 -1
- package/dist/federationSpec.d.ts +0 -25
- package/dist/federationSpec.d.ts.map +0 -1
- package/dist/federationSpec.js +0 -125
- package/dist/federationSpec.js.map +0 -1
- package/dist/genErrorCodeDoc.d.ts +0 -2
- package/dist/genErrorCodeDoc.d.ts.map +0 -1
- package/dist/genErrorCodeDoc.js +0 -61
- package/dist/genErrorCodeDoc.js.map +0 -1
- package/dist/graphQLJSSchemaToAST.d.ts +0 -8
- package/dist/graphQLJSSchemaToAST.d.ts.map +0 -1
- package/dist/graphQLJSSchemaToAST.js +0 -96
- package/dist/graphQLJSSchemaToAST.js.map +0 -1
- package/dist/inaccessibleSpec.d.ts +0 -18
- package/dist/inaccessibleSpec.d.ts.map +0 -1
- package/dist/inaccessibleSpec.js +0 -655
- package/dist/inaccessibleSpec.js.map +0 -1
- package/dist/index.d.ts +0 -24
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -42
- package/dist/index.js.map +0 -1
- package/dist/introspection.d.ts +0 -6
- package/dist/introspection.d.ts.map +0 -1
- package/dist/introspection.js +0 -96
- package/dist/introspection.js.map +0 -1
- package/dist/joinSpec.d.ts +0 -51
- package/dist/joinSpec.d.ts.map +0 -1
- package/dist/joinSpec.js +0 -160
- package/dist/joinSpec.js.map +0 -1
- package/dist/knownCoreFeatures.d.ts +0 -5
- package/dist/knownCoreFeatures.d.ts.map +0 -1
- package/dist/knownCoreFeatures.js +0 -20
- package/dist/knownCoreFeatures.js.map +0 -1
- package/dist/operations.d.ts +0 -403
- package/dist/operations.d.ts.map +0 -1
- package/dist/operations.js +0 -1983
- package/dist/operations.js.map +0 -1
- package/dist/precompute.d.ts +0 -3
- package/dist/precompute.d.ts.map +0 -1
- package/dist/precompute.js +0 -54
- package/dist/precompute.js.map +0 -1
- package/dist/print.d.ts +0 -28
- package/dist/print.d.ts.map +0 -1
- package/dist/print.js +0 -299
- package/dist/print.js.map +0 -1
- package/dist/schemaUpgrader.d.ts +0 -121
- package/dist/schemaUpgrader.d.ts.map +0 -1
- package/dist/schemaUpgrader.js +0 -570
- package/dist/schemaUpgrader.js.map +0 -1
- package/dist/suggestions.d.ts +0 -3
- package/dist/suggestions.d.ts.map +0 -1
- package/dist/suggestions.js +0 -44
- package/dist/suggestions.js.map +0 -1
- package/dist/supergraphs.d.ts +0 -10
- package/dist/supergraphs.d.ts.map +0 -1
- package/dist/supergraphs.js +0 -76
- package/dist/supergraphs.js.map +0 -1
- package/dist/tagSpec.d.ts +0 -19
- package/dist/tagSpec.d.ts.map +0 -1
- package/dist/tagSpec.js +0 -66
- package/dist/tagSpec.js.map +0 -1
- package/dist/types.d.ts +0 -9
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -64
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -64
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -326
- package/dist/utils.js.map +0 -1
- package/dist/validate.d.ts +0 -4
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -239
- package/dist/validate.js.map +0 -1
- package/dist/validation/KnownTypeNamesInFederationRule.d.ts +0 -4
- package/dist/validation/KnownTypeNamesInFederationRule.d.ts.map +0 -1
- package/dist/validation/KnownTypeNamesInFederationRule.js +0 -41
- package/dist/validation/KnownTypeNamesInFederationRule.js.map +0 -1
- package/dist/values.d.ts +0 -23
- package/dist/values.d.ts.map +0 -1
- package/dist/values.js +0 -580
- package/dist/values.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/dist/definitions.d.ts
DELETED
|
@@ -1,663 +0,0 @@
|
|
|
1
|
-
import { ConstArgumentNode, ASTNode, DirectiveLocation, ConstDirectiveNode, DocumentNode, GraphQLError, GraphQLSchema, Kind, TypeNode, VariableDefinitionNode, VariableNode, DirectiveDefinitionNode, DirectiveNode } from "graphql";
|
|
2
|
-
import { CoreImport, CoreSpecDefinition, FeatureUrl } from "./coreSpec";
|
|
3
|
-
import { MapWithCachedArrays } from "./utils";
|
|
4
|
-
import { SDLValidationRule } from "graphql/validation/ValidationContext";
|
|
5
|
-
export declare const ErrGraphQLValidationFailed: (causes: GraphQLError[], message?: string) => GraphQLError;
|
|
6
|
-
export declare const ErrGraphQLAPISchemaValidationFailed: (causes: GraphQLError[]) => GraphQLError;
|
|
7
|
-
export declare const typenameFieldName = "__typename";
|
|
8
|
-
export type QueryRootKind = 'query';
|
|
9
|
-
export type MutationRootKind = 'mutation';
|
|
10
|
-
export type SubscriptionRootKind = 'subscription';
|
|
11
|
-
export type SchemaRootKind = QueryRootKind | MutationRootKind | SubscriptionRootKind;
|
|
12
|
-
export declare const allSchemaRootKinds: SchemaRootKind[];
|
|
13
|
-
export declare function defaultRootName(rootKind: SchemaRootKind): string;
|
|
14
|
-
export declare function isSchemaRootType(type: NamedType): boolean;
|
|
15
|
-
export type Type = NamedType | WrapperType;
|
|
16
|
-
export type NamedType = ScalarType | ObjectType | InterfaceType | UnionType | EnumType | InputObjectType;
|
|
17
|
-
export type OutputType = ScalarType | ObjectType | InterfaceType | UnionType | EnumType | ListType<any> | NonNullType<any>;
|
|
18
|
-
export type InputType = ScalarType | EnumType | InputObjectType | ListType<any> | NonNullType<any>;
|
|
19
|
-
export type WrapperType = ListType<any> | NonNullType<any>;
|
|
20
|
-
export type AbstractType = InterfaceType | UnionType;
|
|
21
|
-
export type CompositeType = ObjectType | InterfaceType | UnionType;
|
|
22
|
-
export type OutputTypeReferencer = FieldDefinition<any>;
|
|
23
|
-
export type InputTypeReferencer = InputFieldDefinition | ArgumentDefinition<any>;
|
|
24
|
-
export type ObjectTypeReferencer = OutputTypeReferencer | UnionType | SchemaDefinition;
|
|
25
|
-
export type InterfaceTypeReferencer = OutputTypeReferencer | ObjectType | InterfaceType;
|
|
26
|
-
export type NullableType = NamedType | ListType<any>;
|
|
27
|
-
export type NamedTypeKind = NamedType['kind'];
|
|
28
|
-
export declare function isNamedType(type: Type): type is NamedType;
|
|
29
|
-
export declare function isWrapperType(type: Type): type is WrapperType;
|
|
30
|
-
export declare function isListType(type: Type): type is ListType<any>;
|
|
31
|
-
export declare function isNonNullType(type: Type): type is NonNullType<any>;
|
|
32
|
-
export declare function isScalarType(type: Type): type is ScalarType;
|
|
33
|
-
export declare function isCustomScalarType(type: Type): boolean;
|
|
34
|
-
export declare function isIntType(type: Type): boolean;
|
|
35
|
-
export declare function isStringType(type: Type): boolean;
|
|
36
|
-
export declare function isFloatType(type: Type): boolean;
|
|
37
|
-
export declare function isBooleanType(type: Type): boolean;
|
|
38
|
-
export declare function isIDType(type: Type): boolean;
|
|
39
|
-
export declare function isObjectType(type: Type): type is ObjectType;
|
|
40
|
-
export declare function isInterfaceType(type: Type): type is InterfaceType;
|
|
41
|
-
export declare function isEnumType(type: Type): type is EnumType;
|
|
42
|
-
export declare function isUnionType(type: Type): type is UnionType;
|
|
43
|
-
export declare function isInputObjectType(type: Type): type is InputObjectType;
|
|
44
|
-
export declare function isOutputType(type: Type): type is OutputType;
|
|
45
|
-
export declare function isInputType(type: Type): type is InputType;
|
|
46
|
-
export declare function isTypeOfKind<T extends Type>(type: Type, kind: T['kind']): type is T;
|
|
47
|
-
export declare function filterTypesOfKind<T extends Type>(types: readonly Type[], kind: T['kind']): T[];
|
|
48
|
-
export declare function baseType(type: Type): NamedType;
|
|
49
|
-
export declare function isNullableType(type: Type): boolean;
|
|
50
|
-
export declare function isAbstractType(type: Type): type is AbstractType;
|
|
51
|
-
export declare function isCompositeType(type: Type): type is CompositeType;
|
|
52
|
-
export declare function possibleRuntimeTypes(type: CompositeType): readonly ObjectType[];
|
|
53
|
-
export declare function runtimeTypesIntersects(t1: CompositeType, t2: CompositeType): boolean;
|
|
54
|
-
export declare function supertypes(type: CompositeType): readonly CompositeType[];
|
|
55
|
-
export declare function isConditionalDirective(directive: Directive<any, any> | DirectiveDefinition<any>): boolean;
|
|
56
|
-
export declare const executableDirectiveLocations: DirectiveLocation[];
|
|
57
|
-
export declare function isExecutableDirectiveLocation(loc: DirectiveLocation): boolean;
|
|
58
|
-
export declare const typeSystemDirectiveLocations: DirectiveLocation[];
|
|
59
|
-
export declare function isTypeSystemDirectiveLocation(loc: DirectiveLocation): boolean;
|
|
60
|
-
export declare function typeToAST(type: Type): TypeNode;
|
|
61
|
-
export declare function typeFromAST(schema: Schema, node: TypeNode): Type;
|
|
62
|
-
export type LeafType = ScalarType | EnumType;
|
|
63
|
-
export declare function isLeafType(type: Type): type is LeafType;
|
|
64
|
-
export interface Named {
|
|
65
|
-
readonly name: string;
|
|
66
|
-
}
|
|
67
|
-
export type ExtendableElement = SchemaDefinition | NamedType;
|
|
68
|
-
export declare class DirectiveTargetElement<T extends DirectiveTargetElement<T>> {
|
|
69
|
-
private readonly _schema;
|
|
70
|
-
readonly appliedDirectives: Directive<T>[];
|
|
71
|
-
constructor(_schema: Schema, directives?: readonly Directive<any>[]);
|
|
72
|
-
schema(): Schema;
|
|
73
|
-
private attachDirective;
|
|
74
|
-
appliedDirectivesOf<TApplicationArgs extends {
|
|
75
|
-
[key: string]: any;
|
|
76
|
-
} = {
|
|
77
|
-
[key: string]: any;
|
|
78
|
-
}>(nameOrDefinition: string | DirectiveDefinition<TApplicationArgs>): Directive<T, TApplicationArgs>[];
|
|
79
|
-
hasAppliedDirective(nameOrDefinition: string | DirectiveDefinition): boolean;
|
|
80
|
-
appliedDirectivesToDirectiveNodes(): ConstDirectiveNode[] | undefined;
|
|
81
|
-
appliedDirectivesToString(): string;
|
|
82
|
-
collectVariablesInAppliedDirectives(collector: VariableCollector): void;
|
|
83
|
-
}
|
|
84
|
-
export declare function sourceASTs<TNode extends ASTNode = ASTNode>(...elts: ({
|
|
85
|
-
sourceAST?: TNode;
|
|
86
|
-
} | undefined)[]): TNode[];
|
|
87
|
-
declare abstract class Element<TParent extends SchemaElement<any, any> | Schema | DirectiveTargetElement<any>> {
|
|
88
|
-
protected _parent?: TParent;
|
|
89
|
-
sourceAST?: ASTNode;
|
|
90
|
-
schema(): Schema;
|
|
91
|
-
protected schemaInternal(): Schema | undefined;
|
|
92
|
-
get parent(): TParent;
|
|
93
|
-
isAttached(): boolean;
|
|
94
|
-
private setParent;
|
|
95
|
-
protected onAttached(): void;
|
|
96
|
-
protected checkUpdate(): void;
|
|
97
|
-
}
|
|
98
|
-
export declare class Extension<TElement extends ExtendableElement> {
|
|
99
|
-
protected _extendedElement?: TElement;
|
|
100
|
-
sourceAST?: ASTNode;
|
|
101
|
-
get extendedElement(): TElement | undefined;
|
|
102
|
-
private setExtendedElement;
|
|
103
|
-
}
|
|
104
|
-
type UnappliedDirective = {
|
|
105
|
-
nameOrDef: DirectiveDefinition<Record<string, any>> | string;
|
|
106
|
-
args: Record<string, any>;
|
|
107
|
-
extension?: Extension<any>;
|
|
108
|
-
directive: DirectiveNode;
|
|
109
|
-
};
|
|
110
|
-
export declare abstract class SchemaElement<TOwnType extends SchemaElement<any, TParent>, TParent extends SchemaElement<any, any> | Schema> extends Element<TParent> {
|
|
111
|
-
protected _appliedDirectives: Directive<TOwnType>[] | undefined;
|
|
112
|
-
protected _unappliedDirectives: UnappliedDirective[] | undefined;
|
|
113
|
-
description?: string;
|
|
114
|
-
addUnappliedDirective({ nameOrDef, args, extension, directive }: UnappliedDirective): void;
|
|
115
|
-
processUnappliedDirectives(): void;
|
|
116
|
-
get appliedDirectives(): readonly Directive<TOwnType>[];
|
|
117
|
-
appliedDirectivesOf<TApplicationArgs extends {
|
|
118
|
-
[key: string]: any;
|
|
119
|
-
} = {
|
|
120
|
-
[key: string]: any;
|
|
121
|
-
}>(nameOrDefinition: string | DirectiveDefinition<TApplicationArgs>): Directive<TOwnType, TApplicationArgs>[];
|
|
122
|
-
hasAppliedDirective(nameOrDefinition: string | DirectiveDefinition<any>): boolean;
|
|
123
|
-
applyDirective<TApplicationArgs extends {
|
|
124
|
-
[key: string]: any;
|
|
125
|
-
} = {
|
|
126
|
-
[key: string]: any;
|
|
127
|
-
}>(nameOrDef: DirectiveDefinition<TApplicationArgs> | string, args?: TApplicationArgs, asFirstDirective?: boolean): Directive<TOwnType, TApplicationArgs>;
|
|
128
|
-
protected removeAppliedDirectives(): void;
|
|
129
|
-
protected onModification(): void;
|
|
130
|
-
protected isElementBuiltIn(): boolean;
|
|
131
|
-
protected removeTypeReferenceInternal(type: BaseNamedType<any, any>): void;
|
|
132
|
-
protected abstract removeTypeReference(type: NamedType): void;
|
|
133
|
-
protected checkRemoval(): void;
|
|
134
|
-
protected checkUpdate(addedElement?: {
|
|
135
|
-
schema(): Schema;
|
|
136
|
-
isAttached(): boolean;
|
|
137
|
-
}): void;
|
|
138
|
-
}
|
|
139
|
-
export declare abstract class NamedSchemaElement<TOwnType extends NamedSchemaElement<TOwnType, TParent, TReferencer>, TParent extends NamedSchemaElement<any, any, any> | Schema, TReferencer> extends SchemaElement<TOwnType, TParent> implements Named {
|
|
140
|
-
protected _name: string;
|
|
141
|
-
constructor(name: string);
|
|
142
|
-
get name(): string;
|
|
143
|
-
abstract coordinate: string;
|
|
144
|
-
abstract remove(): TReferencer[];
|
|
145
|
-
}
|
|
146
|
-
declare abstract class BaseNamedType<TReferencer, TOwnType extends NamedType & NamedSchemaElement<TOwnType, Schema, TReferencer>> extends NamedSchemaElement<TOwnType, Schema, TReferencer> {
|
|
147
|
-
readonly isBuiltIn: boolean;
|
|
148
|
-
protected _referencers?: TReferencer[];
|
|
149
|
-
protected _extensions?: Extension<TOwnType>[];
|
|
150
|
-
preserveEmptyDefinition: boolean;
|
|
151
|
-
constructor(name: string, isBuiltIn?: boolean);
|
|
152
|
-
private addReferencer;
|
|
153
|
-
private removeReferencer;
|
|
154
|
-
get coordinate(): string;
|
|
155
|
-
allChildElements(): Generator<NamedSchemaElement<any, TOwnType, any>, void, undefined>;
|
|
156
|
-
extensions(): readonly Extension<TOwnType>[];
|
|
157
|
-
hasExtension(extension: Extension<any>): boolean;
|
|
158
|
-
newExtension(): Extension<TOwnType>;
|
|
159
|
-
addExtension(extension: Extension<TOwnType>): Extension<TOwnType>;
|
|
160
|
-
removeExtensions(): void;
|
|
161
|
-
isIntrospectionType(): boolean;
|
|
162
|
-
hasExtensionElements(): boolean;
|
|
163
|
-
hasNonExtensionElements(): boolean;
|
|
164
|
-
protected abstract hasNonExtensionInnerElements(): boolean;
|
|
165
|
-
protected abstract removeInnerElementsExtensions(): void;
|
|
166
|
-
protected isElementBuiltIn(): boolean;
|
|
167
|
-
rename(newName: string): void;
|
|
168
|
-
remove(): TReferencer[];
|
|
169
|
-
removeRecursive(): void;
|
|
170
|
-
protected abstract removeReferenceRecursive(ref: TReferencer): void;
|
|
171
|
-
referencers(): readonly TReferencer[];
|
|
172
|
-
isReferenced(): boolean;
|
|
173
|
-
protected abstract removeInnerElements(): void;
|
|
174
|
-
toString(): string;
|
|
175
|
-
}
|
|
176
|
-
export declare abstract class NamedSchemaElementWithType<TType extends Type, TOwnType extends NamedSchemaElementWithType<TType, TOwnType, P, Referencer>, P extends NamedSchemaElement<any, any, any> | Schema, Referencer> extends NamedSchemaElement<TOwnType, P, Referencer> {
|
|
177
|
-
private _type?;
|
|
178
|
-
get type(): TType | undefined;
|
|
179
|
-
set type(type: TType | undefined);
|
|
180
|
-
protected removeTypeReference(type: NamedType): void;
|
|
181
|
-
}
|
|
182
|
-
declare abstract class BaseExtensionMember<TExtended extends ExtendableElement> extends Element<TExtended> {
|
|
183
|
-
private _extension?;
|
|
184
|
-
ofExtension(): Extension<TExtended> | undefined;
|
|
185
|
-
removeOfExtension(): void;
|
|
186
|
-
setOfExtension(extension: Extension<TExtended> | undefined): void;
|
|
187
|
-
remove(): void;
|
|
188
|
-
protected abstract removeInner(): void;
|
|
189
|
-
}
|
|
190
|
-
export declare class SchemaBlueprint {
|
|
191
|
-
onMissingDirectiveDefinition(_schema: Schema, _name: string, _args?: {
|
|
192
|
-
[key: string]: any;
|
|
193
|
-
}): DirectiveDefinition | GraphQLError[] | undefined;
|
|
194
|
-
onDirectiveDefinitionAndSchemaParsed(_: Schema): GraphQLError[];
|
|
195
|
-
ignoreParsedField(_type: NamedType, _fieldName: string): boolean;
|
|
196
|
-
onConstructed(_: Schema): void;
|
|
197
|
-
onAddedCoreFeature(_schema: Schema, _feature: CoreFeature): void;
|
|
198
|
-
onInvalidation(_: Schema): void;
|
|
199
|
-
onValidation(_schema: Schema): GraphQLError[];
|
|
200
|
-
validationRules(): readonly SDLValidationRule[];
|
|
201
|
-
onGraphQLJSValidationError(schema: Schema, error: GraphQLError): GraphQLError;
|
|
202
|
-
onUnknownDirectiveValidationError(_schema: Schema, _unknownDirectiveName: string, error: GraphQLError): GraphQLError;
|
|
203
|
-
applyDirectivesAfterParsing(): boolean;
|
|
204
|
-
}
|
|
205
|
-
export declare const defaultSchemaBlueprint: SchemaBlueprint;
|
|
206
|
-
export declare class CoreFeature {
|
|
207
|
-
readonly url: FeatureUrl;
|
|
208
|
-
readonly nameInSchema: string;
|
|
209
|
-
readonly directive: Directive<SchemaDefinition>;
|
|
210
|
-
readonly imports: CoreImport[];
|
|
211
|
-
readonly purpose?: string | undefined;
|
|
212
|
-
constructor(url: FeatureUrl, nameInSchema: string, directive: Directive<SchemaDefinition>, imports: CoreImport[], purpose?: string | undefined);
|
|
213
|
-
isFeatureDefinition(element: NamedType | DirectiveDefinition): boolean;
|
|
214
|
-
directiveNameInSchema(name: string): string;
|
|
215
|
-
typeNameInSchema(name: string): string;
|
|
216
|
-
}
|
|
217
|
-
export declare class CoreFeatures {
|
|
218
|
-
readonly coreItself: CoreFeature;
|
|
219
|
-
readonly coreDefinition: CoreSpecDefinition;
|
|
220
|
-
private readonly byAlias;
|
|
221
|
-
private readonly byIdentity;
|
|
222
|
-
constructor(coreItself: CoreFeature);
|
|
223
|
-
getByIdentity(identity: string): CoreFeature | undefined;
|
|
224
|
-
allFeatures(): IterableIterator<CoreFeature>;
|
|
225
|
-
private removeFeature;
|
|
226
|
-
private maybeAddFeature;
|
|
227
|
-
private add;
|
|
228
|
-
sourceFeature(element: DirectiveDefinition | Directive | NamedType): {
|
|
229
|
-
feature: CoreFeature;
|
|
230
|
-
nameInFeature: string;
|
|
231
|
-
isImported: boolean;
|
|
232
|
-
} | undefined;
|
|
233
|
-
}
|
|
234
|
-
export type DeferDirectiveArgs = {
|
|
235
|
-
label?: string;
|
|
236
|
-
if?: boolean | Variable;
|
|
237
|
-
};
|
|
238
|
-
export type StreamDirectiveArgs = {
|
|
239
|
-
label?: string;
|
|
240
|
-
initialCount: number;
|
|
241
|
-
if?: boolean;
|
|
242
|
-
};
|
|
243
|
-
export type SchemaConfig = {
|
|
244
|
-
cacheAST?: boolean;
|
|
245
|
-
};
|
|
246
|
-
export declare class Schema {
|
|
247
|
-
readonly blueprint: SchemaBlueprint;
|
|
248
|
-
readonly config: SchemaConfig;
|
|
249
|
-
private _schemaDefinition;
|
|
250
|
-
private readonly _builtInTypes;
|
|
251
|
-
private readonly _types;
|
|
252
|
-
private readonly _builtInDirectives;
|
|
253
|
-
private readonly _directives;
|
|
254
|
-
private _coreFeatures?;
|
|
255
|
-
private isConstructed;
|
|
256
|
-
isValidated: boolean;
|
|
257
|
-
private cachedDocument?;
|
|
258
|
-
private apiSchema?;
|
|
259
|
-
constructor(blueprint?: SchemaBlueprint, config?: SchemaConfig);
|
|
260
|
-
private canModifyBuiltIn;
|
|
261
|
-
private runWithBuiltInModificationAllowed;
|
|
262
|
-
private renameTypeInternal;
|
|
263
|
-
private removeTypeInternal;
|
|
264
|
-
private removeDirectiveInternal;
|
|
265
|
-
private markAsCoreSchema;
|
|
266
|
-
private unmarkAsCoreSchema;
|
|
267
|
-
private onModification;
|
|
268
|
-
isCoreSchema(): boolean;
|
|
269
|
-
get coreFeatures(): CoreFeatures | undefined;
|
|
270
|
-
toAST(): DocumentNode;
|
|
271
|
-
toAPISchema(): Schema;
|
|
272
|
-
private emptyASTDefinitionsForExtensionsWithoutDefinition;
|
|
273
|
-
toGraphQLJSSchema(config?: {
|
|
274
|
-
includeDefer?: boolean;
|
|
275
|
-
includeStream?: boolean;
|
|
276
|
-
}): GraphQLSchema;
|
|
277
|
-
get schemaDefinition(): SchemaDefinition;
|
|
278
|
-
types(): readonly NamedType[];
|
|
279
|
-
interfaceTypes(): readonly InterfaceType[];
|
|
280
|
-
objectTypes(): readonly ObjectType[];
|
|
281
|
-
unionTypes(): readonly UnionType[];
|
|
282
|
-
scalarTypes(): readonly ScalarType[];
|
|
283
|
-
inputTypes(): readonly InputObjectType[];
|
|
284
|
-
enumTypes(): readonly EnumType[];
|
|
285
|
-
builtInTypes(includeShadowed?: boolean): readonly NamedType[];
|
|
286
|
-
private isShadowedBuiltInType;
|
|
287
|
-
allTypes(): readonly NamedType[];
|
|
288
|
-
type(name: string): NamedType | undefined;
|
|
289
|
-
typeOfKind<T extends NamedType>(name: string, kind: T['kind']): T | undefined;
|
|
290
|
-
intType(): ScalarType;
|
|
291
|
-
floatType(): ScalarType;
|
|
292
|
-
stringType(): ScalarType;
|
|
293
|
-
booleanType(): ScalarType;
|
|
294
|
-
idType(): ScalarType;
|
|
295
|
-
builtInScalarTypes(): ScalarType[];
|
|
296
|
-
addType<T extends NamedType>(type: T): T;
|
|
297
|
-
directives(): readonly DirectiveDefinition[];
|
|
298
|
-
builtInDirectives(includeShadowed?: boolean): readonly DirectiveDefinition[];
|
|
299
|
-
allDirectives(): readonly DirectiveDefinition[];
|
|
300
|
-
private isShadowedBuiltInDirective;
|
|
301
|
-
directive(name: string): DirectiveDefinition | undefined;
|
|
302
|
-
builtInDirective(name: string): DirectiveDefinition | undefined;
|
|
303
|
-
allNamedSchemaElement(): Generator<NamedSchemaElement<any, any, any>, void, undefined>;
|
|
304
|
-
allSchemaElement(): Generator<SchemaElement<any, any>, void, undefined>;
|
|
305
|
-
addDirectiveDefinition(name: string): DirectiveDefinition;
|
|
306
|
-
addDirectiveDefinition(directive: DirectiveDefinition): DirectiveDefinition;
|
|
307
|
-
invalidate(): void;
|
|
308
|
-
validate(): void;
|
|
309
|
-
clone(builtIns?: SchemaBlueprint): Schema;
|
|
310
|
-
private getBuiltInDirective;
|
|
311
|
-
includeDirective(): DirectiveDefinition<{
|
|
312
|
-
if: boolean | Variable;
|
|
313
|
-
}>;
|
|
314
|
-
skipDirective(): DirectiveDefinition<{
|
|
315
|
-
if: boolean | Variable;
|
|
316
|
-
}>;
|
|
317
|
-
deprecatedDirective(): DirectiveDefinition<{
|
|
318
|
-
reason?: string;
|
|
319
|
-
}>;
|
|
320
|
-
specifiedByDirective(): DirectiveDefinition<{
|
|
321
|
-
url: string;
|
|
322
|
-
}>;
|
|
323
|
-
deferDirective(): DirectiveDefinition<DeferDirectiveArgs>;
|
|
324
|
-
streamDirective(): DirectiveDefinition<StreamDirectiveArgs>;
|
|
325
|
-
elementByCoordinate(coordinate: string): NamedSchemaElement<any, any, any> | undefined;
|
|
326
|
-
}
|
|
327
|
-
export declare class RootType extends BaseExtensionMember<SchemaDefinition> {
|
|
328
|
-
readonly rootKind: SchemaRootKind;
|
|
329
|
-
readonly type: ObjectType;
|
|
330
|
-
constructor(rootKind: SchemaRootKind, type: ObjectType);
|
|
331
|
-
isDefaultRootName(): boolean;
|
|
332
|
-
protected removeInner(): void;
|
|
333
|
-
}
|
|
334
|
-
export declare class SchemaDefinition extends SchemaElement<SchemaDefinition, Schema> {
|
|
335
|
-
readonly kind: "SchemaDefinition";
|
|
336
|
-
protected readonly _roots: MapWithCachedArrays<SchemaRootKind, RootType>;
|
|
337
|
-
protected _extensions: Extension<SchemaDefinition>[] | undefined;
|
|
338
|
-
preserveEmptyDefinition: boolean;
|
|
339
|
-
roots(): readonly RootType[];
|
|
340
|
-
applyDirective<TApplicationArgs extends {
|
|
341
|
-
[key: string]: any;
|
|
342
|
-
} = {
|
|
343
|
-
[key: string]: any;
|
|
344
|
-
}>(nameOrDef: DirectiveDefinition<TApplicationArgs> | string, args?: TApplicationArgs, asFirstDirective?: boolean): Directive<SchemaDefinition, TApplicationArgs>;
|
|
345
|
-
root(rootKind: SchemaRootKind): RootType | undefined;
|
|
346
|
-
rootType(rootKind: SchemaRootKind): ObjectType | undefined;
|
|
347
|
-
setRoot(rootKind: SchemaRootKind, nameOrType: ObjectType | string): RootType;
|
|
348
|
-
extensions(): Extension<SchemaDefinition>[];
|
|
349
|
-
hasExtension(extension: Extension<any>): boolean;
|
|
350
|
-
newExtension(): Extension<SchemaDefinition>;
|
|
351
|
-
addExtension(extension: Extension<SchemaDefinition>): Extension<SchemaDefinition>;
|
|
352
|
-
hasExtensionElements(): boolean;
|
|
353
|
-
hasNonExtensionElements(): boolean;
|
|
354
|
-
private removeRootType;
|
|
355
|
-
protected removeTypeReference(toRemove: NamedType): void;
|
|
356
|
-
toString(): string;
|
|
357
|
-
}
|
|
358
|
-
export declare class ScalarType extends BaseNamedType<OutputTypeReferencer | InputTypeReferencer, ScalarType> {
|
|
359
|
-
readonly kind: "ScalarType";
|
|
360
|
-
readonly astDefinitionKind = Kind.SCALAR_TYPE_DEFINITION;
|
|
361
|
-
protected removeTypeReference(type: NamedType): void;
|
|
362
|
-
protected hasNonExtensionInnerElements(): boolean;
|
|
363
|
-
protected removeInnerElementsExtensions(): void;
|
|
364
|
-
protected removeInnerElements(): void;
|
|
365
|
-
protected removeReferenceRecursive(ref: OutputTypeReferencer | InputTypeReferencer): void;
|
|
366
|
-
}
|
|
367
|
-
export declare class InterfaceImplementation<T extends ObjectType | InterfaceType> extends BaseExtensionMember<T> {
|
|
368
|
-
readonly interface: InterfaceType;
|
|
369
|
-
constructor(itf: InterfaceType);
|
|
370
|
-
protected removeInner(): void;
|
|
371
|
-
toString(): string;
|
|
372
|
-
}
|
|
373
|
-
declare abstract class FieldBasedType<T extends (ObjectType | InterfaceType) & NamedSchemaElement<T, Schema, R>, R> extends BaseNamedType<R, T> {
|
|
374
|
-
private _interfaceImplementations;
|
|
375
|
-
private readonly _fields;
|
|
376
|
-
private _cachedNonBuiltInFields?;
|
|
377
|
-
protected onAttached(): void;
|
|
378
|
-
private removeFieldInternal;
|
|
379
|
-
interfaceImplementations(): readonly InterfaceImplementation<T>[];
|
|
380
|
-
interfaceImplementation(type: string | InterfaceType): InterfaceImplementation<T> | undefined;
|
|
381
|
-
interfaces(): readonly InterfaceType[];
|
|
382
|
-
implementsInterface(type: string | InterfaceType): boolean;
|
|
383
|
-
addImplementedInterface(nameOrItfOrItfImpl: InterfaceImplementation<T> | InterfaceType | string): InterfaceImplementation<T>;
|
|
384
|
-
fields(): readonly FieldDefinition<T>[];
|
|
385
|
-
hasFields(): boolean;
|
|
386
|
-
builtInFields(): FieldDefinition<T>[];
|
|
387
|
-
allFields(): readonly FieldDefinition<T>[];
|
|
388
|
-
field(name: string): FieldDefinition<T> | undefined;
|
|
389
|
-
typenameField(): FieldDefinition<T> | undefined;
|
|
390
|
-
addField(nameOrField: string | FieldDefinition<T>, type?: Type): FieldDefinition<T>;
|
|
391
|
-
allChildElements(): Generator<NamedSchemaElement<any, any, any>, void, undefined>;
|
|
392
|
-
private removeInterfaceImplementation;
|
|
393
|
-
protected removeTypeReference(type: NamedType): void;
|
|
394
|
-
protected removeInnerElements(): void;
|
|
395
|
-
protected hasNonExtensionInnerElements(): boolean;
|
|
396
|
-
protected removeInnerElementsExtensions(): void;
|
|
397
|
-
}
|
|
398
|
-
export declare class ObjectType extends FieldBasedType<ObjectType, ObjectTypeReferencer> {
|
|
399
|
-
readonly kind: "ObjectType";
|
|
400
|
-
readonly astDefinitionKind = Kind.OBJECT_TYPE_DEFINITION;
|
|
401
|
-
isRootType(): boolean;
|
|
402
|
-
isQueryRootType(): boolean;
|
|
403
|
-
isSubscriptionRootType(): boolean;
|
|
404
|
-
protected removeReferenceRecursive(ref: ObjectTypeReferencer): void;
|
|
405
|
-
unionsWhereMember(): readonly UnionType[];
|
|
406
|
-
}
|
|
407
|
-
export declare class InterfaceType extends FieldBasedType<InterfaceType, InterfaceTypeReferencer> {
|
|
408
|
-
readonly kind: "InterfaceType";
|
|
409
|
-
readonly astDefinitionKind = Kind.INTERFACE_TYPE_DEFINITION;
|
|
410
|
-
allImplementations(): (ObjectType | InterfaceType)[];
|
|
411
|
-
possibleRuntimeTypes(): readonly ObjectType[];
|
|
412
|
-
isPossibleRuntimeType(type: string | NamedType): boolean;
|
|
413
|
-
protected removeReferenceRecursive(ref: InterfaceTypeReferencer): void;
|
|
414
|
-
}
|
|
415
|
-
export declare class UnionMember extends BaseExtensionMember<UnionType> {
|
|
416
|
-
readonly type: ObjectType;
|
|
417
|
-
constructor(type: ObjectType);
|
|
418
|
-
protected removeInner(): void;
|
|
419
|
-
}
|
|
420
|
-
export declare class UnionType extends BaseNamedType<OutputTypeReferencer, UnionType> {
|
|
421
|
-
readonly kind: "UnionType";
|
|
422
|
-
readonly astDefinitionKind = Kind.UNION_TYPE_DEFINITION;
|
|
423
|
-
protected readonly _members: MapWithCachedArrays<string, UnionMember>;
|
|
424
|
-
private _typenameField?;
|
|
425
|
-
protected onAttached(): void;
|
|
426
|
-
types(): ObjectType[];
|
|
427
|
-
members(): readonly UnionMember[];
|
|
428
|
-
membersCount(): number;
|
|
429
|
-
hasTypeMember(type: string | ObjectType): boolean;
|
|
430
|
-
addType(nameOrTypeOrMember: ObjectType | string | UnionMember): UnionMember;
|
|
431
|
-
clearTypes(): void;
|
|
432
|
-
field(name: string): FieldDefinition<UnionType> | undefined;
|
|
433
|
-
typenameField(): FieldDefinition<UnionType> | undefined;
|
|
434
|
-
private removeMember;
|
|
435
|
-
protected removeTypeReference(type: NamedType): void;
|
|
436
|
-
protected removeInnerElements(): void;
|
|
437
|
-
protected hasNonExtensionInnerElements(): boolean;
|
|
438
|
-
protected removeReferenceRecursive(ref: OutputTypeReferencer): void;
|
|
439
|
-
protected removeInnerElementsExtensions(): void;
|
|
440
|
-
}
|
|
441
|
-
export declare class EnumType extends BaseNamedType<OutputTypeReferencer, EnumType> {
|
|
442
|
-
readonly kind: "EnumType";
|
|
443
|
-
readonly astDefinitionKind = Kind.ENUM_TYPE_DEFINITION;
|
|
444
|
-
protected readonly _values: EnumValue[];
|
|
445
|
-
get values(): readonly EnumValue[];
|
|
446
|
-
value(name: string): EnumValue | undefined;
|
|
447
|
-
addValue(value: EnumValue): EnumValue;
|
|
448
|
-
addValue(name: string): EnumValue;
|
|
449
|
-
protected removeTypeReference(type: NamedType): void;
|
|
450
|
-
private removeValueInternal;
|
|
451
|
-
protected removeInnerElements(): void;
|
|
452
|
-
protected hasNonExtensionInnerElements(): boolean;
|
|
453
|
-
protected removeReferenceRecursive(ref: OutputTypeReferencer): void;
|
|
454
|
-
protected removeInnerElementsExtensions(): void;
|
|
455
|
-
}
|
|
456
|
-
export declare class InputObjectType extends BaseNamedType<InputTypeReferencer, InputObjectType> {
|
|
457
|
-
readonly kind: "InputObjectType";
|
|
458
|
-
readonly astDefinitionKind = Kind.INPUT_OBJECT_TYPE_DEFINITION;
|
|
459
|
-
private readonly _fields;
|
|
460
|
-
private _cachedFieldsArray?;
|
|
461
|
-
fields(): InputFieldDefinition[];
|
|
462
|
-
field(name: string): InputFieldDefinition | undefined;
|
|
463
|
-
addField(field: InputFieldDefinition): InputFieldDefinition;
|
|
464
|
-
addField(name: string, type?: Type): InputFieldDefinition;
|
|
465
|
-
hasFields(): boolean;
|
|
466
|
-
allChildElements(): Generator<NamedSchemaElement<any, any, any>, void, undefined>;
|
|
467
|
-
protected removeTypeReference(type: NamedType): void;
|
|
468
|
-
protected removeInnerElements(): void;
|
|
469
|
-
private removeFieldInternal;
|
|
470
|
-
protected hasNonExtensionInnerElements(): boolean;
|
|
471
|
-
protected removeReferenceRecursive(ref: InputTypeReferencer): void;
|
|
472
|
-
protected removeInnerElementsExtensions(): void;
|
|
473
|
-
}
|
|
474
|
-
declare class BaseWrapperType<T extends Type> {
|
|
475
|
-
protected _type: T;
|
|
476
|
-
protected constructor(_type: T);
|
|
477
|
-
schema(): Schema;
|
|
478
|
-
isAttached(): boolean;
|
|
479
|
-
get ofType(): T;
|
|
480
|
-
baseType(): NamedType;
|
|
481
|
-
}
|
|
482
|
-
export declare class ListType<T extends Type> extends BaseWrapperType<T> {
|
|
483
|
-
readonly kind: "ListType";
|
|
484
|
-
constructor(type: T);
|
|
485
|
-
toString(): string;
|
|
486
|
-
}
|
|
487
|
-
export declare class NonNullType<T extends NullableType> extends BaseWrapperType<T> {
|
|
488
|
-
readonly kind: "NonNullType";
|
|
489
|
-
constructor(type: T);
|
|
490
|
-
toString(): string;
|
|
491
|
-
}
|
|
492
|
-
export declare class FieldDefinition<TParent extends CompositeType> extends NamedSchemaElementWithType<OutputType, FieldDefinition<TParent>, TParent, never> {
|
|
493
|
-
readonly isBuiltIn: boolean;
|
|
494
|
-
readonly kind: "FieldDefinition";
|
|
495
|
-
private _args;
|
|
496
|
-
private _extension?;
|
|
497
|
-
constructor(name: string, isBuiltIn?: boolean);
|
|
498
|
-
protected isElementBuiltIn(): boolean;
|
|
499
|
-
get coordinate(): string;
|
|
500
|
-
hasArguments(): boolean;
|
|
501
|
-
arguments(): readonly ArgumentDefinition<FieldDefinition<TParent>>[];
|
|
502
|
-
argument(name: string): ArgumentDefinition<FieldDefinition<TParent>> | undefined;
|
|
503
|
-
addArgument(arg: ArgumentDefinition<FieldDefinition<TParent>>): ArgumentDefinition<FieldDefinition<TParent>>;
|
|
504
|
-
addArgument(name: string, type?: Type, defaultValue?: any): ArgumentDefinition<FieldDefinition<TParent>>;
|
|
505
|
-
ofExtension(): Extension<TParent> | undefined;
|
|
506
|
-
removeOfExtension(): void;
|
|
507
|
-
setOfExtension(extension: Extension<TParent> | undefined): void;
|
|
508
|
-
isIntrospectionField(): boolean;
|
|
509
|
-
isSchemaIntrospectionField(): boolean;
|
|
510
|
-
private removeArgumentInternal;
|
|
511
|
-
private removeParent;
|
|
512
|
-
isDeprecated(): boolean;
|
|
513
|
-
remove(): never[];
|
|
514
|
-
removeRecursive(): void;
|
|
515
|
-
toString(): string;
|
|
516
|
-
}
|
|
517
|
-
export declare class InputFieldDefinition extends NamedSchemaElementWithType<InputType, InputFieldDefinition, InputObjectType, never> {
|
|
518
|
-
readonly kind: "InputFieldDefinition";
|
|
519
|
-
private _extension?;
|
|
520
|
-
defaultValue?: any;
|
|
521
|
-
get coordinate(): string;
|
|
522
|
-
isRequired(): boolean;
|
|
523
|
-
ofExtension(): Extension<InputObjectType> | undefined;
|
|
524
|
-
removeOfExtension(): void;
|
|
525
|
-
setOfExtension(extension: Extension<InputObjectType> | undefined): void;
|
|
526
|
-
isDeprecated(): boolean;
|
|
527
|
-
remove(): never[];
|
|
528
|
-
removeRecursive(): void;
|
|
529
|
-
toString(): string;
|
|
530
|
-
}
|
|
531
|
-
export declare class ArgumentDefinition<TParent extends FieldDefinition<any> | DirectiveDefinition> extends NamedSchemaElementWithType<InputType, ArgumentDefinition<TParent>, TParent, never> {
|
|
532
|
-
readonly kind: "ArgumentDefinition";
|
|
533
|
-
defaultValue?: any;
|
|
534
|
-
constructor(name: string);
|
|
535
|
-
get coordinate(): string;
|
|
536
|
-
isRequired(): boolean;
|
|
537
|
-
isDeprecated(): boolean;
|
|
538
|
-
remove(): never[];
|
|
539
|
-
toString(): string;
|
|
540
|
-
}
|
|
541
|
-
export declare class EnumValue extends NamedSchemaElement<EnumValue, EnumType, never> {
|
|
542
|
-
readonly kind: "EnumValue";
|
|
543
|
-
private _extension?;
|
|
544
|
-
get coordinate(): string;
|
|
545
|
-
ofExtension(): Extension<EnumType> | undefined;
|
|
546
|
-
removeOfExtension(): void;
|
|
547
|
-
setOfExtension(extension: Extension<EnumType> | undefined): void;
|
|
548
|
-
isDeprecated(): boolean;
|
|
549
|
-
remove(): never[];
|
|
550
|
-
protected removeTypeReference(type: NamedType): void;
|
|
551
|
-
toString(): string;
|
|
552
|
-
}
|
|
553
|
-
export declare class DirectiveDefinition<TApplicationArgs extends {
|
|
554
|
-
[key: string]: any;
|
|
555
|
-
} = {
|
|
556
|
-
[key: string]: any;
|
|
557
|
-
}> extends NamedSchemaElement<DirectiveDefinition<TApplicationArgs>, Schema, Directive> {
|
|
558
|
-
readonly isBuiltIn: boolean;
|
|
559
|
-
readonly kind: "DirectiveDefinition";
|
|
560
|
-
private _args?;
|
|
561
|
-
repeatable: boolean;
|
|
562
|
-
private readonly _locations;
|
|
563
|
-
private _referencers?;
|
|
564
|
-
constructor(name: string, isBuiltIn?: boolean);
|
|
565
|
-
get coordinate(): string;
|
|
566
|
-
arguments(): readonly ArgumentDefinition<DirectiveDefinition>[];
|
|
567
|
-
argument(name: string): ArgumentDefinition<DirectiveDefinition> | undefined;
|
|
568
|
-
addArgument(arg: ArgumentDefinition<DirectiveDefinition>): ArgumentDefinition<DirectiveDefinition>;
|
|
569
|
-
addArgument(name: string, type?: InputType, defaultValue?: any): ArgumentDefinition<DirectiveDefinition>;
|
|
570
|
-
private removeArgumentInternal;
|
|
571
|
-
get locations(): readonly DirectiveLocation[];
|
|
572
|
-
addLocations(...locations: DirectiveLocation[]): DirectiveDefinition;
|
|
573
|
-
addAllLocations(): DirectiveDefinition;
|
|
574
|
-
addAllTypeLocations(): DirectiveDefinition;
|
|
575
|
-
removeLocations(...locations: DirectiveLocation[]): DirectiveDefinition;
|
|
576
|
-
hasExecutableLocations(): boolean;
|
|
577
|
-
hasTypeSystemLocations(): boolean;
|
|
578
|
-
applications(): readonly Directive<SchemaElement<any, any>, TApplicationArgs>[];
|
|
579
|
-
private addReferencer;
|
|
580
|
-
private removeReferencer;
|
|
581
|
-
protected removeTypeReference(type: NamedType): void;
|
|
582
|
-
remove(): Directive[];
|
|
583
|
-
removeRecursive(): void;
|
|
584
|
-
toAST(): DirectiveDefinitionNode;
|
|
585
|
-
toString(): string;
|
|
586
|
-
}
|
|
587
|
-
export declare class Directive<TParent extends SchemaElement<any, any> | DirectiveTargetElement<any> = SchemaElement<any, any>, TArgs extends {
|
|
588
|
-
[key: string]: any;
|
|
589
|
-
} = {
|
|
590
|
-
[key: string]: any;
|
|
591
|
-
}> extends Element<TParent> implements Named {
|
|
592
|
-
readonly name: string;
|
|
593
|
-
private _args;
|
|
594
|
-
private _extension?;
|
|
595
|
-
constructor(name: string, _args?: TArgs);
|
|
596
|
-
schema(): Schema;
|
|
597
|
-
get definition(): DirectiveDefinition | undefined;
|
|
598
|
-
arguments(includeDefaultValues?: boolean): Readonly<TArgs>;
|
|
599
|
-
private onModification;
|
|
600
|
-
private isAttachedToSchemaElement;
|
|
601
|
-
setArguments(args: TArgs): void;
|
|
602
|
-
argumentType(name: string): InputType | undefined;
|
|
603
|
-
matchArguments(expectedArgs: Record<string, any>): boolean;
|
|
604
|
-
ofExtension(): Extension<any> | undefined;
|
|
605
|
-
removeOfExtension(): void;
|
|
606
|
-
setOfExtension(extension: Extension<any> | undefined): void;
|
|
607
|
-
argumentsToAST(): ConstArgumentNode[] | undefined;
|
|
608
|
-
remove(): boolean;
|
|
609
|
-
private removeInternal;
|
|
610
|
-
toString(): string;
|
|
611
|
-
}
|
|
612
|
-
export declare function sameDirectiveApplication(application1: Directive<any, any>, application2: Directive<any, any>, directivesNeverEqualToThemselves?: string[]): boolean;
|
|
613
|
-
export declare function sameDirectiveApplications(applications1: readonly Directive<any, any>[], applications2: readonly Directive<any, any>[], directivesNeverEqualToThemselves?: string[]): boolean;
|
|
614
|
-
export declare function isDirectiveApplicationsSubset(applications: readonly Directive<any, any>[], maybeSubset: readonly Directive<any, any>[]): boolean;
|
|
615
|
-
export declare function directiveApplicationsSubstraction(baseApplications: readonly Directive<any, any>[], toRemove: readonly Directive<any, any>[]): Directive<any, any>[];
|
|
616
|
-
export declare class Variable {
|
|
617
|
-
readonly name: string;
|
|
618
|
-
constructor(name: string);
|
|
619
|
-
toVariableNode(): VariableNode;
|
|
620
|
-
toString(): string;
|
|
621
|
-
}
|
|
622
|
-
export type Variables = readonly Variable[];
|
|
623
|
-
export declare class VariableCollector {
|
|
624
|
-
private readonly _variables;
|
|
625
|
-
add(variable: Variable): void;
|
|
626
|
-
addAll(variables: Variables): void;
|
|
627
|
-
collectInArguments(args: {
|
|
628
|
-
[key: string]: any;
|
|
629
|
-
}): void;
|
|
630
|
-
variables(): Variable[];
|
|
631
|
-
toString(): string;
|
|
632
|
-
}
|
|
633
|
-
export declare function isVariable(v: any): v is Variable;
|
|
634
|
-
export declare class VariableDefinition extends DirectiveTargetElement<VariableDefinition> {
|
|
635
|
-
readonly variable: Variable;
|
|
636
|
-
readonly type: InputType;
|
|
637
|
-
readonly defaultValue?: any;
|
|
638
|
-
constructor(schema: Schema, variable: Variable, type: InputType, defaultValue?: any);
|
|
639
|
-
toVariableDefinitionNode(): VariableDefinitionNode;
|
|
640
|
-
toString(): string;
|
|
641
|
-
}
|
|
642
|
-
export declare class VariableDefinitions {
|
|
643
|
-
private readonly _definitions;
|
|
644
|
-
add(definition: VariableDefinition): boolean;
|
|
645
|
-
addAll(definitions: VariableDefinitions): void;
|
|
646
|
-
definition(variable: Variable | string): VariableDefinition | undefined;
|
|
647
|
-
isEmpty(): boolean;
|
|
648
|
-
definitions(): readonly VariableDefinition[];
|
|
649
|
-
filter(variables: Variables): VariableDefinitions;
|
|
650
|
-
toVariableDefinitionNodes(): readonly VariableDefinitionNode[] | undefined;
|
|
651
|
-
toString(): string;
|
|
652
|
-
}
|
|
653
|
-
export declare function variableDefinitionsFromAST(schema: Schema, definitionNodes: readonly VariableDefinitionNode[]): VariableDefinitions;
|
|
654
|
-
export declare function variableDefinitionFromAST(schema: Schema, definitionNode: VariableDefinitionNode): VariableDefinition;
|
|
655
|
-
export declare function newNamedType(kind: NamedTypeKind, name: string): NamedType;
|
|
656
|
-
export declare function copyDirectiveDefinitionToSchema({ definition, schema, copyDirectiveApplicationsInArguments, locationFilter, }: {
|
|
657
|
-
definition: DirectiveDefinition;
|
|
658
|
-
schema: Schema;
|
|
659
|
-
copyDirectiveApplicationsInArguments: boolean;
|
|
660
|
-
locationFilter?: (loc: DirectiveLocation) => boolean;
|
|
661
|
-
}): void;
|
|
662
|
-
export {};
|
|
663
|
-
//# sourceMappingURL=definitions.d.ts.map
|