what's the easiest way to filter on a date being g...
# prisma-whats-new
c
what's the easiest way to filter on a date being greater than today?
d
what have you tried so far ? 🙂
Copy code
query ($today: DateTime!) {
  allUsers(filter: { createdAt_gt: $today }) { id }
}
👍🏻 1
c
haha not entirely sure where to start. i take it there's no equivalent to sysdate or now()?
i think i got it sorted, thanks.
Mind if I ask another one of you?
This works in playground:
query getFactors($startDate:DateTime!, $endDate:DateTime!) { allFactors(orderBy: createdAt_DESC, filter:{ AND: [{ startOn_lte:$startDate, OR:[{ endOn: null },{ endOn_gte: $endDate }] }] }) { id description score } }
however, running in my webapp, I get The inline argument "endOn" of kind "NullValue" is not supported. Use variables instead of inline arguments to overcome this limitation.
wtf am i supposed to do with this 😄
n
@claym, that's a problem with Apollo Client. Again, would love to discuss this in the Forum https://www.graph.cool/forum/ 🙂
c
ended up figuring it out as I was typing it into the forum 😄 thanks!
n
the Forum is a magical place 😂
s
@claym what's the reason?