ErrorPolicy enum

ErrorPolicy determines the level of events for errors in the execution result. The options are:

  • 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: Using the all policy is the best way to notify your users of potential issues while still showing as much data as possible from your server. It saves both data and errors into the Apollo Cache so your UI can use them.


all → const ErrorPolicy
const ErrorPolicy(2)
ignore → const ErrorPolicy
const ErrorPolicy(1)
none → const ErrorPolicy
const ErrorPolicy(0)
values → const List<ErrorPolicy>

A constant List of the values in this enum, in order of their declaration.

const List<ErrorPolicy>


index → int

The integer index of this enum.

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.


operator ==(dynamic other) → bool
The equality operator.