You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appendix lists the specified type system definitions.
4
-
5
-
The descriptions are non-normative. Implementations are recommended to use them
6
-
for consistency but different descriptions are allowed.
3
+
This appendix lists all type system definitions specified in this document.
7
4
8
5
The order of types, fields, arguments, values and directives is non-normative.
9
6
10
7
```graphql
11
-
"""
12
-
The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
13
-
"""
14
8
scalarString
15
9
16
-
"""
17
-
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
18
-
"""
19
10
scalarInt
20
11
21
-
"""
22
-
The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).
23
-
"""
24
12
scalarFloat
25
13
26
-
"""
27
-
The `Boolean` scalar type represents `true` or `false`.
28
-
"""
29
14
scalarBoolean
30
15
31
-
"""
32
-
The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.
33
-
"""
34
16
scalarID
35
17
36
-
"""
37
-
Directs the executor to include this field or fragment only when the `if` argument is true.
Marks an element of a GraphQL schema as no longer supported.
58
-
"""
59
22
directive@deprecated(
60
-
"""
61
-
Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).
Exposes a URL that specifies the behavior of this scalar.
68
-
"""
69
-
directive@specifiedBy(
70
-
"""
71
-
The URL that specifies the behavior of this scalar.
72
-
"""
73
-
url: String!
74
-
) onSCALAR
26
+
directive@specifiedBy(url: String!) onSCALAR
27
+
28
+
directive@oneOfonINPUT_OBJECT
75
29
76
-
"""
77
-
A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.
78
-
"""
79
30
type__Schema {
80
31
description: String
81
-
82
-
"""
83
-
A list of all types supported by this server.
84
-
"""
85
32
types: [__Type!]!
86
-
87
-
"""
88
-
The type that query operations will be rooted at.
89
-
"""
90
33
queryType: __Type!
91
-
92
-
"""
93
-
If this server supports mutation, the type that mutation operations will be rooted at.
94
-
"""
95
34
mutationType: __Type
96
-
97
-
"""
98
-
If this server support subscription, the type that subscription operations will be rooted at.
99
-
"""
100
35
subscriptionType: __Type
101
-
102
-
"""
103
-
A list of all directives supported by this server.
104
-
"""
105
36
directives: [__Directive!]!
106
37
}
107
38
108
-
"""
109
-
The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.
110
-
111
-
Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.
An enum describing what kind of type a given `__Type` is.
128
-
"""
129
53
enum__TypeKind {
130
-
"""
131
-
Indicates this type is a scalar.
132
-
"""
133
54
SCALAR
134
-
135
-
"""
136
-
Indicates this type is an object. `fields` and `interfaces` are valid fields.
137
-
"""
138
55
OBJECT
139
-
140
-
"""
141
-
Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.
142
-
"""
143
56
INTERFACE
144
-
145
-
"""
146
-
Indicates this type is a union. `possibleTypes` is a valid field.
147
-
"""
148
57
UNION
149
-
150
-
"""
151
-
Indicates this type is an enum. `enumValues` is a valid field.
152
-
"""
153
58
ENUM
154
-
155
-
"""
156
-
Indicates this type is an input object. `inputFields` is a valid field.
157
-
"""
158
59
INPUT_OBJECT
159
-
160
-
"""
161
-
Indicates this type is a list. `ofType` is a valid field.
162
-
"""
163
60
LIST
164
-
165
-
"""
166
-
Indicates this type is a non-null. `ofType` is a valid field.
167
-
"""
168
61
NON_NULL
169
62
}
170
63
171
-
"""
172
-
Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.
173
-
"""
174
64
type__Field {
175
65
name: String!
176
66
description: String
@@ -180,37 +70,22 @@ type __Field {
180
70
deprecationReason: String
181
71
}
182
72
183
-
"""
184
-
Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.
185
-
"""
186
73
type__InputValue {
187
74
name: String!
188
75
description: String
189
76
type: __Type!
190
-
191
-
"""
192
-
A GraphQL-formatted string representing the default value for this input value.
193
-
"""
194
77
defaultValue: String
195
78
isDeprecated: Boolean!
196
79
deprecationReason: String
197
80
}
198
81
199
-
"""
200
-
One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.
201
-
"""
202
82
type__EnumValue {
203
83
name: String!
204
84
description: String
205
85
isDeprecated: Boolean!
206
86
deprecationReason: String
207
87
}
208
88
209
-
"""
210
-
A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
211
-
212
-
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.
0 commit comments