@0no-co/graphql.web 1.3.1 → 1.3.2
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/dist/graphql.web.d.ts +71 -5
- package/package.json +1 -1
package/dist/graphql.web.d.ts
CHANGED
|
@@ -24,12 +24,77 @@ type Location =
|
|
|
24
24
|
source: Source;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
// When `graphql` isn't installed, `typeof GraphQL.Kind` resolves to `any`. That would make
|
|
28
|
+
// `keyof typeof GraphQL.Kind` match every `Key` and collapse `GraphQLKind` and the `Kind` value
|
|
29
|
+
// itself to `any`, breaking discriminated unions on AST `kind` fields. `IsGraphQLAny` detects that
|
|
30
|
+
// case so we fall back to the literal string kinds instead.
|
|
31
|
+
type IsGraphQLAny = 0 extends 1 & typeof GraphQL.Kind ? true : false;
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
type GraphQLKind<Key extends string, Fallback extends string> = IsGraphQLAny extends true
|
|
34
|
+
? Fallback
|
|
35
|
+
: Key extends keyof typeof GraphQL.Kind
|
|
36
|
+
? (typeof GraphQL.Kind)[Key]
|
|
37
|
+
: Fallback;
|
|
38
|
+
|
|
39
|
+
declare const Kind: (IsGraphQLAny extends true ? {} : typeof GraphQL.Kind) & {
|
|
40
|
+
readonly NAME: GraphQLKind<'NAME', 'Name'>;
|
|
41
|
+
readonly DOCUMENT: GraphQLKind<'DOCUMENT', 'Document'>;
|
|
42
|
+
readonly OPERATION_DEFINITION: GraphQLKind<'OPERATION_DEFINITION', 'OperationDefinition'>;
|
|
43
|
+
readonly VARIABLE_DEFINITION: GraphQLKind<'VARIABLE_DEFINITION', 'VariableDefinition'>;
|
|
44
|
+
readonly SELECTION_SET: GraphQLKind<'SELECTION_SET', 'SelectionSet'>;
|
|
45
|
+
readonly FIELD: GraphQLKind<'FIELD', 'Field'>;
|
|
46
|
+
readonly ARGUMENT: GraphQLKind<'ARGUMENT', 'Argument'>;
|
|
47
|
+
readonly FRAGMENT_SPREAD: GraphQLKind<'FRAGMENT_SPREAD', 'FragmentSpread'>;
|
|
48
|
+
readonly INLINE_FRAGMENT: GraphQLKind<'INLINE_FRAGMENT', 'InlineFragment'>;
|
|
49
|
+
readonly FRAGMENT_DEFINITION: GraphQLKind<'FRAGMENT_DEFINITION', 'FragmentDefinition'>;
|
|
50
|
+
readonly VARIABLE: GraphQLKind<'VARIABLE', 'Variable'>;
|
|
51
|
+
readonly INT: GraphQLKind<'INT', 'IntValue'>;
|
|
52
|
+
readonly FLOAT: GraphQLKind<'FLOAT', 'FloatValue'>;
|
|
53
|
+
readonly STRING: GraphQLKind<'STRING', 'StringValue'>;
|
|
54
|
+
readonly BOOLEAN: GraphQLKind<'BOOLEAN', 'BooleanValue'>;
|
|
55
|
+
readonly NULL: GraphQLKind<'NULL', 'NullValue'>;
|
|
56
|
+
readonly ENUM: GraphQLKind<'ENUM', 'EnumValue'>;
|
|
57
|
+
readonly LIST: GraphQLKind<'LIST', 'ListValue'>;
|
|
58
|
+
readonly OBJECT: GraphQLKind<'OBJECT', 'ObjectValue'>;
|
|
59
|
+
readonly OBJECT_FIELD: GraphQLKind<'OBJECT_FIELD', 'ObjectField'>;
|
|
60
|
+
readonly DIRECTIVE: GraphQLKind<'DIRECTIVE', 'Directive'>;
|
|
61
|
+
readonly NAMED_TYPE: GraphQLKind<'NAMED_TYPE', 'NamedType'>;
|
|
62
|
+
readonly LIST_TYPE: GraphQLKind<'LIST_TYPE', 'ListType'>;
|
|
63
|
+
readonly NON_NULL_TYPE: GraphQLKind<'NON_NULL_TYPE', 'NonNullType'>;
|
|
64
|
+
readonly SCHEMA_DEFINITION: GraphQLKind<'SCHEMA_DEFINITION', 'SchemaDefinition'>;
|
|
65
|
+
readonly OPERATION_TYPE_DEFINITION: GraphQLKind<
|
|
66
|
+
'OPERATION_TYPE_DEFINITION',
|
|
67
|
+
'OperationTypeDefinition'
|
|
68
|
+
>;
|
|
69
|
+
readonly SCALAR_TYPE_DEFINITION: GraphQLKind<'SCALAR_TYPE_DEFINITION', 'ScalarTypeDefinition'>;
|
|
70
|
+
readonly OBJECT_TYPE_DEFINITION: GraphQLKind<'OBJECT_TYPE_DEFINITION', 'ObjectTypeDefinition'>;
|
|
71
|
+
readonly FIELD_DEFINITION: GraphQLKind<'FIELD_DEFINITION', 'FieldDefinition'>;
|
|
72
|
+
readonly INPUT_VALUE_DEFINITION: GraphQLKind<'INPUT_VALUE_DEFINITION', 'InputValueDefinition'>;
|
|
73
|
+
readonly INTERFACE_TYPE_DEFINITION: GraphQLKind<
|
|
74
|
+
'INTERFACE_TYPE_DEFINITION',
|
|
75
|
+
'InterfaceTypeDefinition'
|
|
76
|
+
>;
|
|
77
|
+
readonly UNION_TYPE_DEFINITION: GraphQLKind<'UNION_TYPE_DEFINITION', 'UnionTypeDefinition'>;
|
|
78
|
+
readonly ENUM_TYPE_DEFINITION: GraphQLKind<'ENUM_TYPE_DEFINITION', 'EnumTypeDefinition'>;
|
|
79
|
+
readonly ENUM_VALUE_DEFINITION: GraphQLKind<'ENUM_VALUE_DEFINITION', 'EnumValueDefinition'>;
|
|
80
|
+
readonly INPUT_OBJECT_TYPE_DEFINITION: GraphQLKind<
|
|
81
|
+
'INPUT_OBJECT_TYPE_DEFINITION',
|
|
82
|
+
'InputObjectTypeDefinition'
|
|
83
|
+
>;
|
|
84
|
+
readonly DIRECTIVE_DEFINITION: GraphQLKind<'DIRECTIVE_DEFINITION', 'DirectiveDefinition'>;
|
|
85
|
+
readonly SCHEMA_EXTENSION: GraphQLKind<'SCHEMA_EXTENSION', 'SchemaExtension'>;
|
|
86
|
+
readonly SCALAR_TYPE_EXTENSION: GraphQLKind<'SCALAR_TYPE_EXTENSION', 'ScalarTypeExtension'>;
|
|
87
|
+
readonly OBJECT_TYPE_EXTENSION: GraphQLKind<'OBJECT_TYPE_EXTENSION', 'ObjectTypeExtension'>;
|
|
88
|
+
readonly INTERFACE_TYPE_EXTENSION: GraphQLKind<
|
|
89
|
+
'INTERFACE_TYPE_EXTENSION',
|
|
90
|
+
'InterfaceTypeExtension'
|
|
91
|
+
>;
|
|
92
|
+
readonly UNION_TYPE_EXTENSION: GraphQLKind<'UNION_TYPE_EXTENSION', 'UnionTypeExtension'>;
|
|
93
|
+
readonly ENUM_TYPE_EXTENSION: GraphQLKind<'ENUM_TYPE_EXTENSION', 'EnumTypeExtension'>;
|
|
94
|
+
readonly INPUT_OBJECT_TYPE_EXTENSION: GraphQLKind<
|
|
95
|
+
'INPUT_OBJECT_TYPE_EXTENSION',
|
|
96
|
+
'InputObjectTypeExtension'
|
|
97
|
+
>;
|
|
33
98
|
/** Coordinates */
|
|
34
99
|
readonly TYPE_COORDINATE: GraphQLKind<'TYPE_COORDINATE', 'TypeCoordinate'>;
|
|
35
100
|
readonly MEMBER_COORDINATE: GraphQLKind<'MEMBER_COORDINATE', 'MemberCoordinate'>;
|
|
@@ -911,6 +976,7 @@ export type {
|
|
|
911
976
|
IntValueNode,
|
|
912
977
|
InterfaceTypeDefinitionNode,
|
|
913
978
|
InterfaceTypeExtensionNode,
|
|
979
|
+
IsGraphQLAny,
|
|
914
980
|
ListTypeNode,
|
|
915
981
|
ListValueNode,
|
|
916
982
|
Location,
|
package/package.json
CHANGED