ErrorPolicy enum
ErrorPolicy determines the level of events for GraphQL Errors in the execution result. The options are:
While the default for all client methods is none, all is recommended for notifying your users of potential issues.
- none (default): Any GraphQL Errors are treated the same as network errors and any data is ignored from the response.
- ignore: Ignore allows you to read any data that is returned alongside GraphQL Errors, but doesn't save the errors or report them to your UI.
- all: Saves both data and errors into the
cache
so your UI can use them. It is recommended for notifying your users of potential issues, while still showing as much data as possible from your server.
NOTE: ErrorPolicy only effects GraphQL Errors. Client side and network exceptions are added to a QueryResult as they occur, and can co-exist alongside data.
Values
- none → const ErrorPolicy
-
Any GraphQL Errors are treated the same as network errors and any data is ignored from the response. (default)
- ignore → const ErrorPolicy
-
Ignore allows you to read any data that is returned alongside GraphQL Errors, but doesn't save the errors or report them to your UI.
- all → const ErrorPolicy
-
Saves both data and errors into the
cache
so your UI can use them.It is recommended for notifying your users of potential issues, while still showing as much data as possible from your server.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
ErrorPolicy> - A constant List of the values in this enum, in order of their declaration.