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
{{ message }}
This repository was archived by the owner on Sep 3, 2021. It is now read-only.
In scenario b, this cypher statement would be batched and sent along with all the other "auto generated" queries. This would probably be my preferred option, as it would allow for the most freedom.
Thanks!
The text was updated successfully, but these errors were encountered:
Hey @thefliik - this is a really good use case. Thanks for opening the issue.
I see this as an extension of our initial middleware support. If we by convention passed through a specific object from the context as parameters to the @cypher Cypher query then your example above would be possible with just a @cypher directive and would not require a custom resolver implementation.
So the middlware would just have to create the appropriate cypherParams object in the context.
If those values were available as parameters in the @cypher Cypher query, would that solve your issue?
@johnymontana thanks for the reply! I'm very sorry I missed it.
Even though this is super late: I think your proposal would address the example cited in this issue. You are saying that a graphql schema might have something like:
Where I would have some ability to define the the$cypherParams param and pass it to the neo4jgraphql middleware (or something similar)? I think that would do the trick.
Is it possible for the database graphql schema to be different from the public facing schema?
Example: in the database schema, a person has many primary email addresses
In the public facing schema, a person only has one primary email address:
If someone requests a person, unbenounced to them, their user id is used to filter the email address field and return zero or one email address:
This might be accomplished by either
A) having neo4j-graphql-js use a different schema from the public facing one, allowing for
B) letting the user resolve a particular node by dynamically passing in the cypher for it. Something like:
In scenario b, this cypher statement would be batched and sent along with all the other "auto generated" queries. This would probably be my preferred option, as it would allow for the most freedom.
Thanks!
The text was updated successfully, but these errors were encountered: