-
Notifications
You must be signed in to change notification settings - Fork 53
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: Improve error message for NonNull GQL types #1333
Conversation
505c78f
to
bf2b2df
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1333 +/- ##
===========================================
+ Coverage 70.51% 70.55% +0.03%
===========================================
Files 184 184
Lines 17801 17803 +2
===========================================
+ Hits 12553 12561 +8
+ Misses 4289 4285 -4
+ Partials 959 957 -2
|
bf2b2df
to
f2377d8
Compare
// NonNull is the literal name of the GQL type, so we have to disable the linter | ||
//nolint:revive | ||
ErrNonNullNotSupported = errors.New("NonNull fields are not currently supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Instead of suppressing with linter, can do this:
// NonNull is the literal name of the GQL type, so we have to disable the linter | |
//nolint:revive | |
ErrNonNullNotSupported = errors.New("NonNull fields are not currently supported") | |
// NonNull is the literal name of the GQL type, so we have to disable the linter | |
//nolint:revive | |
ErrNonNullNotSupported = errors.New("currently NonNull fields are not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty against changing user-visible behaviour for the sake of linters, regardless of how minimal the change might be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM. 1 Minor suggestion
* Add test adding schema with NonNull field * Improve error message for NonNull GQL types
* Add test adding schema with NonNull field * Improve error message for NonNull GQL types
Relevant issue(s)
Resolves #1192
Description
Improves the error message when attempting to declare a GQL schema with a NonNull field type.