mutation where: _or does not filter at all
See original GitHub issueVersion Information
Server Version: 2.15.0-ce
Environment
OSS
What is the current behaviour?
With this mutation:
mutation SoftDeleteAll($account_id: String!, $deleted_at: timestamptz!) {
update_notification(
where: {
_or: [{ sender_id: { _eq: $account_id }, recipient_id: { _eq: $account_id } }]
}
_set: { deleted_at: $deleted_at }
) {
affected_rows
}
}
I get back 0 affected rows
.
What is the expected behaviour?
Don’t know if this is a correct mutation filter as on docs there’s no _or
filter mutation, so according to the docs this should be translated to this:
update_notification_many(
updates: [
{ where: { sender_id: { _eq: $account_id } }, _set: { deleted_at: $deleted_at } }
{ where: { recipient_id: { _eq: $account_id }}, _set: { deleted_at: $deleted_at } }
]
) {
affected_rows
}
The latter is working but why the 1st one does not work. I really can’t remember if the 1st query was working in previous server versions (I’m still in development mode and I’ve never touched this mutation until recently).
Edit: tried 2.14.0
,2.13.0
and the same happens, 1st mutation returns 0 affected_rows
Keywords
_or where mutation
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
FilterMutectCalls does not actually filter mutations. Only flag ...
Only flag them. Hi I was wonder why this tool only annotate the mutations, and does not actually filter (out) mutations that are...
Read more >Array.prototype - .filter - Does it mutate?
Description. The filter() method creates a new array with all elements that pass the test implemented by the provided function.
Read more >How to filter observable data not mutation source?
You can achieve that just using pipe and filter . Filter by text field: public textChanged(text: string) { this.
Read more >Mutation Filters - omicsoft doc
Mutation Filters. For views that contain data from DNA-seq and RNA-seq, these views can be filtered to variants of interest. The Mutation tab...
Read more >MTHFR Mutation: What It Is & What to Do About It
If you have no mutations at MTHFR, you will excrete all ten parts of mercury at 100%, assuming your detox pathways are optimal....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for confirming! I agree, it’s so easy to mix up brackets.
FWIW, when I modified it, Prettier autoformatted it to be over multiple lines. (I use a plugin for my editor(s) to run Prettier on everything it can.) You might find that an autoformatter helps you find bugs like this, especially if you’re liberal in sprinkling newlines everywhere.
This is reproducible in Hasura Cloud (v2.14.0) too.
Steps to reproduce:
Query Variables: