Intellicode / graphql-resolver-cache

Caching for Graphql Resolvers
MIT License
19 stars 3 forks source link

Fix cache key and return value on first call #6

Closed maxnowack closed 6 years ago

maxnowack commented 6 years ago

If a top level query is cached, root would be null and the cache key is ambiguously. That's why I've added hash(func) to the cache key. Additionally if root or args including non plain objects, it's possible that object-hash fail.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.7%) to 93.548% when pulling fcead70329f6d095944961b43146f9686e7bb9c0 on maxnowack:patch-3 into 6dd638089ccd93afccb5916119acda94875d57c1 on Intellicode:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.7%) to 93.548% when pulling fcead70329f6d095944961b43146f9686e7bb9c0 on maxnowack:patch-3 into 6dd638089ccd93afccb5916119acda94875d57c1 on Intellicode:master.

Intellicode commented 6 years ago

@maxnowack Thanks for your contributions!

Intellicode commented 6 years ago

@maxnowack I've made a new release for your fixes - please don't hestitate to open an issue with feature requests!