Consider the following GraphQL schema:
type Claim {
startDate: Date!
endDate: Date!
status: ClaimStatus!
}
enum ClaimStatus {
Active
Complete
Error
}
I am trying to create a query that can return all of the “active” claims, which are claims that have the Active
status and claims where the current date falls within the startDate
and endDate
.
This is the query schema:
type Query {
activeClaims: [Claim!]!
@resolver(name: "get_active_claims", paginated: true)
}
But this is where I am sort of at a loss, all of the Paginate
examples I’ve seen use a Match
call along with an Index
. If I had an array of docs, I think I could come up with the appropriate Filter
combination to get a filtered array, but I haven’t really seen any examples that combine Filter
with Paginate
. Is it even possible?