From f4fb1bd4cbddb83e2cd6c58005d4e2e220ae303f Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Thu, 7 Dec 2023 18:01:54 -0800 Subject: [PATCH 1/2] 3.10 Input Objects - clarify lists are permitted as Input fields A minor omission in 3.10 Input Objects confused me briefly today by suggesting lists might not be permitted as the type of an input field. However, they are (and are even used in the examples), so add it in. Alternatively, the kinds of permitted fields could be described explicitly as they are under Field Arguments: https://spec.graphql.org/draft/#sel-GAHZjCZABABDukZ --- spec/Section 3 -- Type System.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index d32b08566..56d4f1caa 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -1548,7 +1548,7 @@ Fields may accept arguments to configure their behavior. These inputs are often scalars or enums, but they sometimes need to represent more complex values. A GraphQL Input Object defines a set of input fields; the input fields are -either scalars, enums, or other input objects. This allows arguments to accept +scalars, enums, lists, or other input objects. This allows arguments to accept arbitrarily complex structs. In this example, an Input Object called `Point2D` describes `x` and `y` inputs: From 934e72e15f21f672af4b20b4cfb98efff6bb9bdf Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Fri, 8 Dec 2023 09:51:48 -0800 Subject: [PATCH 2/2] Update spec/Section 3 -- Type System.md Accept Benjie's suggestion Co-authored-by: Benjie --- spec/Section 3 -- Type System.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index 56d4f1caa..9d353a170 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -1548,8 +1548,9 @@ Fields may accept arguments to configure their behavior. These inputs are often scalars or enums, but they sometimes need to represent more complex values. A GraphQL Input Object defines a set of input fields; the input fields are -scalars, enums, lists, or other input objects. This allows arguments to accept -arbitrarily complex structs. +scalars, enums, other input objects, or any wrapping type whose underlying base +type is one of those three. This allows arguments to accept arbitrarily complex +structs. In this example, an Input Object called `Point2D` describes `x` and `y` inputs: