cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Graphql library @cypher directive not in where clauses

Hey everyone! 

I have a schema that looks like this 

```(:User)<-[:SUBMITTED_BY]-(:Submission)-[:SUBMITTED]->(:Form)```

I need to be able to filter by users that have completed a certain set of forms. I was able to add a @cypher directive onto my graphql schema like this:

``

completedTrack: Boolean!
@cypher(
statement: """
MATCH (this)<-[:SUBMITTED_BY]-(s:Submission)
WHERE EXISTS ((s)-[:SUBMITTED]->(:Form { type: $cypherParams.formTrackName }))

return count(s) >= $cypherParams.trackSurveys
"""
)` 

I can sort by this value in my options when querying for users, but I am not able to filter by this value in my where clause. I noticed that other values that use the @cypher directive also have the same issue, which would be fairly big for my business logic. Is this a bug or intended feature? I would love to learn more on why they are left out of the where clauses that are generated. Thanks!

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online