readField<T> method

T? readField<T>(
  1. FieldNode field,
  2. Object? data
)

Returns denormalized data for the given field and normalized data, recursively resolving any references.

Implementation

T? readField<T>(FieldNode field, Object? data) => denormalizeNode(
      selectionSet: field.selectionSet,
      dataForNode: data,
      config: NormalizationConfig(
        read: _config.read,
        variables: _config.variables,
        typePolicies: _config.typePolicies,
        referenceKey: _config.referenceKey,
        fragmentMap: _config.fragmentMap,
        dataIdFromObject: _config.dataIdFromObject,
        addTypename: _config.addTypename,
        allowPartialData: true,
        allowDanglingReference: true,
        possibleTypes: _config.possibleTypes,
      ),
    ) as T?;