Skip to content

Commit

Permalink
Provide options.storeFieldName to custom read/merge functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Feb 7, 2020
1 parent 9fbcda9 commit 689846e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cache/inmemory/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export interface FieldFunctionOptions<
// processing. Always a string, even when options.field is null.
fieldName: string;

// The full field key used internally, including serialized key arguments.
storeFieldName: string;

// The FieldNode object used to read this field. Useful if you need to
// know about other attributes of the field, such as its directives. This
// option will be null when a string was passed to options.readField.
Expand Down Expand Up @@ -642,6 +645,7 @@ function makeFieldFunctionOptions(
argumentsObjectFromField(nameOrField, variables),
field: typeof nameOrField === "string" ? null : nameOrField,
fieldName,
storeFieldName,
variables,
policies,
isReference,
Expand Down

0 comments on commit 689846e

Please sign in to comment.