Skip to content
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

Argument need not be optional to have a default value defined #1703

Open
wants to merge 1 commit into
base: source
Choose a base branch
from

Conversation

gpj1
Copy link

@gpj1 gpj1 commented May 17, 2024

Closes #

Description

Current documentation about Arguments says that "When an argument is optional, we can define a default value ..."
This seems to be misleading because a default value for an argument can be defined irrespective of optional or mandatory argument.

Copy link

vercel bot commented May 17, 2024

@gpj1 is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

linux-foundation-easycla bot commented May 17, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@benjie
Copy link
Member

benjie commented May 18, 2024

Interesting nuance; technically you can’t define a default value for a non-optional argument, since an optional argument is one that is either nullable or has a default value, but this is a bit if a circular argument! Thanks for bringing this to our attention, definitely feels like the wording could be cleaned up 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants