Skip to content

Commit 380038d

Browse files
committed
Add "Any" scalar type
1 parent 8ce457b commit 380038d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

spec/Section 3 -- Type System.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,25 @@ a given GraphQL server expects. Any other input value, including float input
248248
values (such as `4.0`), must raise a query error indicating an incorrect type.
249249

250250

251+
#### Any
252+
253+
The Any scalar type represents any value that is supported by underlying
254+
serialization protocol (including lists and maps). It is intended to be used
255+
as an opt-out type in cases when the exact type is not known in advance.
256+
257+
Note: If Any is wrapped by Non-Null then standard rules are applied. That means
258+
{null} value will produce error both for input and output values.
259+
260+
**Result Coercion**
261+
262+
GraphQL servers should coerce raw value to the value compatible with underlying
263+
serialization protocol when possible otherwise they must raise a field error.
264+
265+
**Input Coercion**
266+
267+
When expected as an input type, any input values are accepted.
268+
269+
251270
### Objects
252271

253272
GraphQL queries are hierarchical and composed, describing a tree of information.

spec/Section 7 -- Response.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ the following JSON concepts:
5858
| Int | Number |
5959
| Float | Number |
6060
| Enum Value | String |
61+
| Any | Any value |
6162

6263
**Object Property Ordering**
6364

0 commit comments

Comments
 (0)