readQuery method

Map<String, dynamic>? readQuery(
  1. Request request,
  2. {bool optimistic = true}
)
inherited

Reads a GraphQL query from the root query id.

Implementation

Map<String, dynamic>? readQuery(
  Request request, {
  bool optimistic = true,
}) =>
    denormalizeOperation(
      // provided from cache
      read: (dataId) => readNormalized(dataId, optimistic: optimistic),
      typePolicies: typePolicies,
      dataIdFromObject: dataIdFromObject,
      returnPartialData: returnPartialData,
      addTypename: addTypename,
      // if there is partial data, we cannot read and return null
      handleException: true,
      // provided from request
      document: request.operation.document,
      operationName: request.operation.operationName,
      variables: sanitizeVariables(request.variables)!,
      possibleTypes: possibleTypes,
    );