Skip to content

Add "Any" scalar type #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,25 @@ a given GraphQL server expects. Any other input value, including float input
values (such as `4.0`), must raise a query error indicating an incorrect type.


#### Any

The Any scalar type represents any value that is supported by underlying
serialization protocol (including lists and maps). It is intended to be used
as an opt-out type in cases when the exact type is not known in advance.

Note: If Any is wrapped by Non-Null then standard rules are applied. That means
{null} value will produce error both for input and output values.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra line

**Result Coercion**

GraphQL servers should coerce raw value to the value compatible with underlying
serialization protocol when possible otherwise they must raise a field error.

**Input Coercion**

When expected as an input type, any input values are accepted.


### Objects

GraphQL queries are hierarchical and composed, describing a tree of information.
Expand Down
1 change: 1 addition & 0 deletions spec/Section 7 -- Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ the following JSON concepts:
| Int | Number |
| Float | Number |
| Enum Value | String |
| Any | Any value |

**Object Property Ordering**

Expand Down