watchQuery<TData, TVars> method

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

watches the given query from the cache only, no network operations will be performed

Implementation

Stream<TData?> watchQuery<TData, TVars>(
    OperationRequest<TData, TVars> request,
    {bool optimistic = true}) {
  return _handleStreamCommand<TData?>(
    (port) => WatchQueryCommand(port.sendPort, request),
    (data, sink) => sink.add(data),
  );
}