Skip to content

Commit adf603a

Browse files
author
Viktor Tochonov
committed
Fixed incomplete pattern matching
1 parent 1ae1cdf commit adf603a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/FSharp.Data.GraphQL.Server.Middleware/SchemaDefinitions.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ let rec private coerceObjectListFilterInput x : Result<ObjectListFilter voption,
4444
| s when s.EndsWith ("_in") && s.Length > "_in".Length -> In (prefix "_in" s)
4545
| s -> Equals s
4646

47-
let (|EquatableValue|Other|) v =
47+
let (|EquatableValue|NonEquatableValue|) v =
4848
match v with
4949
| IntValue v -> EquatableValue (v :> System.IComparable)
5050
| FloatValue v -> EquatableValue (v :> System.IComparable)
5151
| BooleanValue v -> EquatableValue (v :> System.IComparable)
5252
| StringValue v -> EquatableValue (v :> System.IComparable)
5353
| EnumValue v -> EquatableValue (v :> System.IComparable)
54-
| v -> Other v
54+
| v -> NonEquatableValue v
5555

56-
let (|ComparableValue|Other|) v =
56+
let (|ComparableValue|NonComparableValue|) v =
5757
match v with
5858
| IntValue v -> ComparableValue (v :> System.IComparable)
5959
| FloatValue v -> ComparableValue (v :> System.IComparable)
6060
| BooleanValue v -> ComparableValue (v :> System.IComparable)
6161
| StringValue v -> ComparableValue (v :> System.IComparable)
62-
| v -> Other v
62+
| v -> NonComparableValue v
6363

6464
let buildAnd x =
6565
let rec build acc x =
@@ -117,7 +117,7 @@ let rec private coerceObjectListFilterInput x : Result<ObjectListFilter voption,
117117
values
118118
|> Seq.map (function
119119
| EquatableValue v -> Ok v
120-
| Other v ->
120+
| NonEquatableValue v ->
121121
Error
122122
{ new IGQLError with
123123
member _.Message = $"Cannot coerce '{v.GetType ()}' to 'System.IComparable'"

0 commit comments

Comments
 (0)