neo4j-graphql-js
neo4j-graphql-js copied to clipboard
Feature Request: Support Partial Caching of Results
I'm really excited by this project!
Is it possible to capture the (partial) results of neo4j-graphql resolvers so they can be saved in a cache like Redis?
If a cached result of a resolver can be used, is there a way to conditionally disable the use of neo4j-graphql for that resolver?
Hey @alflennik -
One approach could be to implement your own resolvers and call out to the neo4jgraphql or cypherQuery exports which would allow you to intercept the data (or handle the database query) and store in a cache - you could then check the cache in the resolver instead of calling out to the database.
We're also considering implementing an Apollo Datasource which would wrap neo4j-graphql.js and allow us to implement caching in the Datasource. We're still researching this option.
https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608