GraphQlProviderExceptions class
GraphQlProvider exceptions parser.
- Throws ConnectionException on SocketException or
XMLHttpRequest
error. - Throws AuthorizationException on headers failure or response 401 status.
- Throws GraphQlException on anything related to GraphQL or server error.
- May throw scheme-defined exception on
handleException
if the response hasdata
fields (it's up tohandleException
optional callback to parse them). - Re-throws LinkException if the exception hasn't been expected (network error).
All expected exceptions are mixins of LocalizedExceptionMixin.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fire(
QueryResult< Object?> result, [Exception handleException(Map<String, dynamic> )?]) → void -
parses exceptions of the given
result
and throws if any. -
parse(
QueryResult< Object?> result, [Exception handleException(Map<String, dynamic> )?]) → Object? -
Returns an exception of the given
result
withhandleException
if it has the specified error code ornull
if no exception was found.