Nested filters are not working
magaton opened this issue · comments
Reference:
https://grandstack.io/docs/graphql-filtering/#nested-filter
I am trying to achieve the same:
My schema:
interface Period {
id: String!
value: Int!
name: String!
type: String!
startDate: _Neo4jDate!
endDate: _Neo4jDate!
in: [Period] @relation(name: "IN_PERIOD", direction: OUT)
next: [Period] @relation(name: "NEXT", direction: OUT)
}
type Week implements Period {
id: String!
value: Int!
name: String!
type: String!
startDate: _Neo4jDate!
endDate: _Neo4jDate!
payDate: _Neo4jDate!
in: [Period] @relation(name: "IN_PERIOD", direction: OUT)
next: [Period] @relation(name: "NEXT", direction: OUT)
}
The augmented schema looks good:
type Week implements Period {
id: String!
value: Int!
name: String!
type: String!
startDate: _Neo4jDate!
endDate: _Neo4jDate!
payDate: _Neo4jDate!
in(
first: Int
offset: Int
orderBy: [_PeriodOrdering!]
filter: _PeriodFilter
): [Period]
next(
first: Int
offset: Int
orderBy: [_PeriodOrdering!]
filter: _PeriodFilter
): [Period]
}
but this query:
{
Week(
filter: {
in: { value:2020 }
}
)
{
id
value
startDate {
formatted
}
endDate {
formatted
}
payDate {
formatted
}
}
}
results with an error:
{
"errors": [
{
"message": "Exception while fetching data (/Week) : null",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"Week"
]
}
]
}
In the logs I can see:
DEBUG org.neo4j.graphql.RelationOperator - in on type Week was used for filtering, consider using in_every instead
but it throws the same error if I replace in with in_every
Nested filters used to work fine in older versions (older than 1.3), however is not working anymore. Any views on having this fixed soon ?