Skip to content

Commit 7fd53c2

Browse files
VectorTetraViktor Tochonov
and
Viktor Tochonov
authored
Fixed OfTypes case for ObjectListFilter and implemented new tests for OfTypes filter (#522)
* Fixed `OfTypes` case for `ObjectListFilter` and implemented new tests for `OfTypes` filter with different types quantity * Format MiddlewareTests.fs --------- Co-authored-by: Viktor Tochonov <[email protected]>
1 parent 878a90a commit 7fd53c2

File tree

3 files changed

+247
-130
lines changed

3 files changed

+247
-130
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ module ObjectListFilter =
224224
| OfTypes types ->
225225
types
226226
|> Seq.map (fun t -> buildTypeDiscriminatorCheck param t)
227-
|> Seq.reduce (fun acc expr -> Expression.Or (acc, expr))
227+
|> Seq.reduce (fun acc expr -> Expression.OrElse (acc, expr))
228228
| FilterField f ->
229229
let paramExpr = Expression.PropertyOrField (param, f.FieldName)
230230
buildFilterExpr (SourceExpression paramExpr) buildTypeDiscriminatorCheck f.Value

0 commit comments

Comments
 (0)