watchQuery<TData, TVars> method Null safety

Stream<TData?> watchQuery<TData, TVars>(
  1. OperationRequest<TData, TVars> request,
  2. {bool optimistic = true}
)

Watches for changes to data in the Cache for the given operation.

Implementation

Stream<TData?> watchQuery<TData, TVars>(
  OperationRequest<TData, TVars> request, {
  bool optimistic = true,
}) =>
    _watch(
      getChangeStream: () => operationDataChangeStream(
        request,
        optimistic,
        optimisticPatchesStream,
        optimisticReader,
        store,
        typePolicies,
        addTypename,
        dataIdFromObject,
        possibleTypes,
      ),
      getData: () => readQuery(request, optimistic: optimistic),
    );