Lexical comparison operators for text fields #7332
reiv
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Payload already supports
greater_than
,less_than
etc. in thewhere
clause of a REST API call, but these operators are missing in the filter UI and also in the GraphQL schema.This is relevant when defining a cursor based on a text field, e.g. retrieving the next
N
entries afterfoobar
in alphabetical order.Edit: I just realized that this wouldn't help my particular use case because the sort order needs to be locale-aware as well (think umlauts going to the expected place instead of all the way at the end after 'Z'). I had to resort to querying the entire dataset and then running
String.localeCompare
on it. Accounting for this in Payload or the underlying db adapter seems nontrivial, so consider it a separate feature request :)Beta Was this translation helpful? Give feedback.
All reactions