Hello! I seem to have hit a wall. I am trying to do a simple query to get a list of documents between two dates. Right now my plan is to just pass a single date in the query and calculate “last 7 days”, “last month” etc.
The document model:
type Report @collection(name: "reports"){ user: User! date: Date! }
I have an index: reports_by_date
I know that the index works:
I am trying to make it work through a graphql query. Currently the resolver function looks like this and it returns empty:
Query( Lambda( ["date"], Select( ["data"], Map( Paginate( Range( Match(Index("reports_by_date")), TimeSubtract(Var("date"), 22, "days"), Var("date") ) ), Lambda("x", Get(Var("x"))) ) ) ) )
I have tried some FQL tests with no luck: