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

fix(compiler): InputValueDefinition::is_required() returns false if there is a default value #798

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

goto-bus-stop
Copy link
Member

@goto-bus-stop goto-bus-stop commented Jan 8, 2024

Now argument.is_required() == true only if the type is non-null and there is no
default value, meaning a value must be provided when it's used. This is how the
spec describes required arguments.

This seems more useful as the previous implementation can already be achieved
by checking argument.ty.is_non_null().

It's kind of a fix, kind of just a change, kind of breaking...

Copy link
Contributor

@SimonSapin SimonSapin left a comment

Choose a reason for hiding this comment

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

Do we know of any callers, such as in router or federation-next? Do they need to change?

@goto-bus-stop
Copy link
Member Author

I didn't find any!

@goto-bus-stop goto-bus-stop merged commit 90d7fb9 into main Jan 8, 2024
11 checks passed
@goto-bus-stop goto-bus-stop deleted the required-default branch January 8, 2024 16:48
@goto-bus-stop goto-bus-stop mentioned this pull request Jan 15, 2024
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.

2 participants