-
Notifications
You must be signed in to change notification settings - Fork 198
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: use AND
operator when searching for multiple labels
#957
Conversation
AND
operators when searching for multiple labels
AND
operators when searching for multiple labelsAND
operator when searching for multiple labels
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.
tAck
@@ -73,7 +73,7 @@ export default async function (parent, args) { | |||
} | |||
|
|||
if (where?.labels_in?.length) { |
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.
Maybe we should rename to labels_contains like in https://github.com/snapshot-labs/workflow/issues/254#issuecomment-2500056076 ?
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.
May I ask why?
labels_in
is consistent with all the other *_in
filters, using AND
operator
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.
Just to keep it the same as SX, else I don't have any problems with _in
Refer https://github.com/snapshot-labs/workflow/issues/254#issuecomment-2500056076
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.
But i already approved PR, in case we want to proceed 😅 no problem in using _in
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.
It's fine to keep _in
filter, we dont want to have both _in
and _contains
and we don't want to change things in snapshot.org or the new UI. We will merge all to the same syntax once we have a single API.
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.
utACK
Toward https://github.com/snapshot-labs/workflow/issues/254
This PR will change how proposal's labels are searched for.
Currently,
labels_in
operates with theOR
operator, and when searching for[1, 2]
, will return proposals with either1
or2
.This PR will change the operator to
AND
(to be consistent with all other existing_in
filters), so that when searching for[1, 2]
, will return results for proposals that have both1
and2