watchFragment<TData, TVars> method

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

watches the given fragment from the cache, no network request will be performed

Implementation

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