Closed simone-sanfratello closed 2 years ago
add option to define a custom serialize function for any policy, or one for all, for example
const schema = ` type Query { add(x: Int, y: Int): Int } ` // ... app.register(cache, { ttl: 10, policy: { Query: { add: { key: ({ fields, self, args, info, context }) => `x:${args.x}-y:${args.y}` } } })
note: extendKey option is ignored, should be thrown an error on policy validation if key and extendKey are both used
extendKey
key
add option to define a custom serialize function for any policy, or one for all, for example
note:
extendKey
option is ignored, should be thrown an error on policy validation ifkey
andextendKey
are both used