The Guild LogoThe Guild Monogram

Search docs

Search icon

Products by The Guild

Products

Hive logoHive blurred logo

Hive

Schema Registry for your GraphQL Workflows

Skip to main content

Interface: CacheTransformConfig

types/src.YamlConfig.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:953


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:937


invalidate#

Optional invalidate: CacheInvalidateConfig

Defined in#

packages/types/src/config.ts:954