You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Filters should not be available on a @cypher directive field since they don't work.
Test Case
GraphQL schema
typePerson {
id: IDname: String@cypher(statement:"RETURN this.name")
age(mult:Int=13) : [Int] @cypher(statement:"RETURN this.age * mult")
friends: [Person] @cypher(statement:"MATCH (this)-[:KNOWS]-(o) RETURN o")
data: UserData@cypher(statement: "MATCH (this)-[:CREATED_MAP]->(m:Map) WITH collect({id: m.id, name: m.name}) AS mapsCreated, this RETURN {firstName: this.firstName, lastName: this.lastName, organization: this.organization, mapsCreated: mapsCreated}", passThrough:true)
}
typeQuery {
person : [Person]
p2: [Person] @cypher(statement:"MATCH (p:Person) RETURN p")
p3(name:String): Person@cypher(statement:"MATCH (p:Person) WHERE p.name = name RETURN p")
getUser(userId: ID): UserData@cypher(statement: "MATCH (u:User{id: {userId}})-[:CREATED_MAP]->(m:Map) WITH collect({id: m.id, name: m.name}) AS mapsCreated, u RETURN {firstName: u.firstName, lastName: u.lastName, organization: u.organization, mapsCreated: mapsCreated}", passThrough:true)
}
GraphQL request
{ person { friends(filter: {name: "won't work"}) { id } }}
Expected cypher query
Validation error
Additional context
It's unclear if it would even be possible to fix the root issue of the filters not working on cypher fields. On the one hand the statement in the cypher directive could be just about anything, how could a filter be injected? But on the other hand the type is known, so presumably it could be handled? In any case, at least until that could be fixed they should not be in the augmented schema.
The text was updated successfully, but these errors were encountered:
Describe the bug
Filters should not be available on a
@cypher
directive field since they don't work.Test Case
GraphQL schema
GraphQL request
Expected cypher query
Validation error
Additional context
It's unclear if it would even be possible to fix the root issue of the filters not working on cypher fields. On the one hand the statement in the cypher directive could be just about anything, how could a filter be injected? But on the other hand the type is known, so presumably it could be handled? In any case, at least until that could be fixed they should not be in the augmented schema.
The text was updated successfully, but these errors were encountered: