types_src.yamlconfig.cachetransformconfig

Interface: CacheTransformConfig#

types/src.YamlConfig.CacheTransformConfig

Hierarchy#

  • CacheTransformConfig

Table of contents#

Properties#

Properties#

cacheKey#

Optional cacheKey: string

Cache key to use to store your resolvers responses. The defualt is: {typeName}-{fieldName}-{argsHash}-{fieldNamesHash}

Available variables:

  • {args.argName} - use resolver argument
  • {typeName} - use name of the type
  • {fieldName} - use name of the field
  • {argsHash} - a hash based on the 'args' object
  • {fieldNamesHash} - a hash based on the field names selected by the client
  • {info} - the GraphQLResolveInfo of the resolver

Available interpolations:

  • {format|date} - returns the current date with a specific format

Defined in: packages/types/src/config.ts:850


field#

field: string

The type and field to apply cache to, you can use wild cards as well, for example: Query.*

Defined in: packages/types/src/config.ts:834


invalidate#

Optional invalidate: CacheInvalidateConfig

Defined in: packages/types/src/config.ts:851