ErrorLink class

ErrorLink allows interception of GraphQL errors (using onGraphQLError) and LinkExceptions (using onException).

In both cases ErrorLink transfers control over to the handler which may return a new stream to discard the original stream. If the handler returns null, the original stream is left intact and will be allowed to continue streaming new events.

Inheritance

Constructors

ErrorLink.new({ErrorHandler? onGraphQLError, ExceptionHandler? onException})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
onException ExceptionHandler?
final
onGraphQLError ErrorHandler?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

concat(Link next) Link
Adds next after this link
inherited
dispose() Future<void>
Can be called to clean up resources
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request(Request request, [NextLink? forward]) Stream<Response>
A function called when a request reaches this Link
override
route(LinkRouter route) Link
Route requests after this link
inherited
split(bool test(Request request), Link left, [Link right = const PassthroughLink()]) Link
Split requests after this link
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited