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 has data fields (it's up to handleException 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

GraphQlProviderExceptions()

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 with handleException if it has the specified error code or null if no exception was found.