I feel like I’m missing something basic on this, and I’ve been going through all the filter documentation out there but to no avail. Imagine I have a collection of nodes, which each have two datetimes, say ‘expectedTime’ and ‘actualTime’.
Now if I want to find out all the situations where the person was ‘late’, which is to say actualTime is after expectedTime, how would I go about filtering the search? First I thought I could simply do this:
But of course that doesn’t work, with an error saying that it can’t parse “expectedTime” as a date. Maybe something to do with variables? But my various attempts never worked. If I store a variable for each time, that represents all the times for the nodes, not for a single node.
So, given a collection of nodes with those two values, how do I select only those where one is after the other?
I thought of doing that, but it doesn’t work. For example, consider this small data set where two people (Michael and Raquel) are late and one person (Paul is on time). I set it like so:
Which I suppose makes sense… the variabled “expected” contains a bunch of values. How do I tell dgraph to focus on specifically the value for the node in question?