-
Notifications
You must be signed in to change notification settings - Fork 13
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
Apply a filter even if it is nil if it is explicitly specified in the GraphQL request #17
Comments
What happens if you uncomment Id and what happens if you set e.g. a non existing Id in it? |
With an empty id it should return nothing, maybe we need to read the context from gqlgen like we do with update whitelist to check whether it is null or empty. Sometimes that difference is not there. |
It is definitely something I want to fix with this library so it's the right place to ask this issue! |
I'll try it out tomorrow with my own code do not have cases yet in my own programs submodel filtering but it should work! |
If uncommented it returns an empty array {
"errors": [
{
"message": "Could not list deals",
"path": [
"deals"
]
}
],
"data": null
} When commented, generated SQL is quite descriptive SELECT * FROM "deal"; |
What query do you want based on this
I think
is the right output because we can't decide what exactly we want for a query. Maybe we can agree that
Should return the query like
|
The program does not yet understand the difference between explicit nil values in pointers. We fixed this in the update input so field which are set can be updated to nil values and fields which are not set will be ignored! See discussion here: 99designs/gqlgen#505 |
I can do the same for the filters as the update input so
will be supported. Does this resolve your use-case? |
Not sure if this is the right place for the issue. So direct me if I'm wrong. But as the resolver is generated by
gqlgen-sqlboiler
it might be the right spot.Example below returns all fields from the database, but should return empty list
The text was updated successfully, but these errors were encountered: