-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: Allow filtering by nil #789
Conversation
ea877e6
to
3a2c338
Compare
3a2c338
to
6112b65
Compare
Codecov Report
@@ Coverage Diff @@
## develop #789 +/- ##
===========================================
+ Coverage 59.13% 59.17% +0.04%
===========================================
Files 153 153
Lines 16977 16994 +17
===========================================
+ Hits 10039 10057 +18
+ Misses 6021 6020 -1
Partials 917 917
|
6112b65
to
88f0141
Compare
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.
LGTM!
}, | ||
Results: []map[string]interface{}{ | ||
{ | ||
"Name": "Fred", |
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.
👌
@@ -9,6 +9,11 @@ import ( | |||
// le does value comparisons to determine whether one | |||
// value is strictly less than another. | |||
func le(condition, data interface{}) (bool, error) { | |||
if condition == nil { | |||
// Only nil is less than or equal to nil |
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.
praise: this context comment are appreciated.
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.
LGTM!
question(non-blocking): Wondering if the behavior would work for more complicated types as well? if so a few tests for that would be nice, for example:
query {
users(groupBy: [Age]) {
Age
_count(_group: {filter: {Age: {_gt: null}}})
}
}
I cant see how it could break (in different ways) there - aggregates run the same filter code as everywhere else. |
88f0141
to
f2e5907
Compare
Includes NullValue support
f2e5907
to
9523aac
Compare
* Update gql-go version to latest Includes NullValue support * Go mod tidy * Add support for filter by nil
Relevant issue(s)
Resolves #410
Description
Allows filtering by nil. Requires sourcenetwork/graphql-go#6 and mod.go should be updated once that is merged.
Todo:
Specify the platform(s) on which this was tested: