Skip to content

3.10 Input Objects - clarify lists are permitted as Input fields#1068

Merged
leebyron merged 2 commits intographql:mainfrom
msolomon:patch-1
Apr 17, 2025
Merged

3.10 Input Objects - clarify lists are permitted as Input fields#1068
leebyron merged 2 commits intographql:mainfrom
msolomon:patch-1

Conversation

@msolomon
Copy link
Contributor

@msolomon msolomon commented Dec 8, 2023

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

I believe this is simply an editing mistake.

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
@netlify
Copy link

netlify bot commented Dec 8, 2023

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 934e72e
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/657357b63a587e0008060ed8
😎 Deploy Preview https://deploy-preview-1068--graphql-spec-draft.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 8, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Good find! Since "list" is actually a wrapping type, and you can't have a "list of unions" here, we should be more specific. I've made an alternative suggestion:

Accept Benjie's suggestion

Co-authored-by: Benjie <benjie@jemjie.com>
@msolomon msolomon requested a review from benjie December 8, 2023 21:03
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

LGTM! @graphql/tsc another +1 and we'll merge 👍

@benjie benjie added the ✏️ Editorial PR is non-normative or does not influence implementation label Dec 9, 2023
@leebyron leebyron merged commit c855454 into graphql:main Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✏️ Editorial PR is non-normative or does not influence implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants