Skip to content

Commit 8fc6eb5

Browse files
Copilotxperiandri
andauthored
Trim excess ObjectListFilter README changes
Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
1 parent 03c2285 commit 8fc6eb5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,10 @@ query TestQuery {
399399

400400
This filter is mapped by the middleware into the `ObjectListFilter` discriminated union, with cases such as `And`, `Or`, `Not`, `Equals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`, `In`, `StartsWith`, `EndsWith`, `Contains`, `OfTypes`, and `FilterField`.
401401

402-
- The comparer-aware cases in the public discriminated union are `Equals`, `StartsWith`, `EndsWith`, and `Contains`.
402+
- `Equals`, `StartsWith`, `EndsWith`, and `Contains` now carry a comparer in the public discriminated union.
403403
- `Equals` and `Contains` keep the non-generic `System.Collections.IComparer` because they also support non-string comparable values in the public discriminated union.
404-
- When filters come from GraphQL input, suffix casing selects the string comparer automatically: lowercase suffixes use case-insensitive matching and capitalized suffixes use case-sensitive matching.
405404
- When the filtered field is a string and you construct the DU cases directly, pass a `StringComparer` instance in that comparer slot. `StringComparer` is accepted there because it also implements `System.Collections.IComparer`. Use `StringComparer.Ordinal` for case-sensitive matching and `StringComparer.OrdinalIgnoreCase` for case-insensitive matching.
406-
- The built-in `=@@`, `@@=`, and string `@=@` operators keep the existing case-sensitive `CurrentCulture` behavior when no comparer is supplied. `===` continues to use the normal equality translation.
405+
- The built-in case-sensitive operators (`===`, `=@@`, `@@=`, `@=@`) still use the default comparer behavior for you.
407406
- `Contains` is also used for collection membership checks, so the wrapped value type inside `FieldFilter<_>` stays `System.IComparable` instead of being limited to `string`.
408407
- If you were previously constructing `Equals`, `StartsWith`, `EndsWith`, or `Contains` directly, update those call sites to provide the comparer argument explicitly.
409408

0 commit comments

Comments
 (0)