Skip to content

Allows nullable error attributes in GraphqlErrorBuilder - #2670

Merged
bbakerman merged 4 commits into
masterfrom
nullable-error-attrs
Feb 4, 2022
Merged

bbakerman merged 4 commits into
masterfrom
nullable-error-attrs

Conversation

@bbakerman

Copy link
Copy Markdown
Member

See #2637

@bbakerman bbakerman added this to the 18.0 milestone Jan 4, 2022

@andimarek andimarek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should use the Nullable annotation to communicate this more clearly


public GraphqlErrorBuilder locations(List<SourceLocation> locations) {
this.locations.addAll(assertNotNull(locations));
if (locations != null) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we add the Nullable annotation to the argument to make this more clear?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@bbakerman I think that is a missunderstanding: the result is never null, but the argument. So the directive should be on the argument.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

@bbakerman
bbakerman merged commit 62ccef6 into master Feb 4, 2022
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