Skip to content
Closed
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
5 changes: 3 additions & 2 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1489,8 +1489,9 @@ Expected Type | Provided Value | Coerced Value
`[Int]` | `[1, "b", true]` | Error: Incorrect item value
`[Int]` | `1` | `[1]`
`[Int]` | `null` | `null`
`[[Int]]` | `[[1], [2, 3]]` | `[[1], [2, 3]`
`[[Int]]` | `[1, 2, 3]` | Error: Incorrect item value
`[[Int]]` | `[[1], [2, 3]]` | `[[1], [2, 3]]`
Copy link
Member

Choose a reason for hiding this comment

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

`[[Int]]` | `[1, 2, 3]` | `[[1], [2], [3]]`
`[[Int]]` | `[1, null, 3]` | `[[1], null, [3]]`
Copy link
Member

Choose a reason for hiding this comment

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

Both above cases are correct as is since this coercion applied only if:
http://facebook.github.io/graphql/June2018/#sec-Type-System.List

If the value passed as an input to a list type is NOT A LIST

`[[Int]]` | `1` | `[[1]]`
`[[Int]]` | `null` | `null`

Expand Down