Intellicode / graphql-resolver-cache

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

Allow to set custom cache key through options #10

Closed matteodem closed 6 years ago

matteodem commented 6 years ago

For some reason withCache calls on the same level generate the same cache keys. This option will allow to define a custom key.

matteodem commented 6 years ago

Need some guidance on how to fix the unit tests. Hope the config makes sense

matteodem commented 6 years ago

@Intellicode did you have time to look at this?

Intellicode commented 6 years ago

@matteodem Sorry, I completely missed it! Looks fine to me :)

update: Would you mind to fix the tests? Then I'll merge + release

Intellicode commented 6 years ago

You can fix the tests by providing a default for options, for example as part as the function arguments like this: options = {}

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.2%) to 91.892% when pulling 91a3d065f99710b3db9fcb6a4815bc070383d68b on matteodem:patch-1 into 3e579e0ecdf767c2213b8589a6139d3fb512c3e9 on Intellicode:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.2%) to 91.892% when pulling 91a3d065f99710b3db9fcb6a4815bc070383d68b on matteodem:patch-1 into 3e579e0ecdf767c2213b8589a6139d3fb512c3e9 on Intellicode:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.2%) to 91.892% when pulling 91a3d065f99710b3db9fcb6a4815bc070383d68b on matteodem:patch-1 into 3e579e0ecdf767c2213b8589a6139d3fb512c3e9 on Intellicode:master.

matteodem commented 6 years ago

@Intellicode thanks!

Intellicode commented 6 years ago

@matteodem you too, made a new release for you as well!