request<TData, TVars> method
Stream<OperationResponse<TData, TVars> >
request<TData, TVars>(
- OperationRequest<
TData, TVars> operationRequest, [ - NextTypedLink<
TData, TVars> ? forward
override
Implementation
@override
Stream<OperationResponse<TData, TVars>> request<TData, TVars>(
OperationRequest<TData, TVars> operationRequest, [
forward,
]) {
try {
return forward!(operationRequest).transform(
StreamTransformer.fromHandlers(
handleError: (error, stackTrace, sink) => sink.add(
OperationResponse(
operationRequest: operationRequest,
linkException: error is LinkException
? error
: TypedLinkException(error, stackTrace),
dataSource: DataSource.None,
),
),
),
);
} catch (error, stackTrace) {
return Stream.value(
OperationResponse(
operationRequest: operationRequest,
linkException: error is LinkException
? error
: TypedLinkException(error, stackTrace),
dataSource: DataSource.None,
),
);
}
}