GraphQLError class

An error that may occur during the execution of a GraphQL query.

This will almost always be passed to a GraphQLException.

Implemented types

Constructors

GraphQLError(String message, {List<GraphQLErrorLocation> locations = const [], List<Object>? path, Map<String, Object?>? extensions, StackTrace? stackTrace, Object? sourceError})
An error that may occur during the execution of a GraphQL query.
GraphQLError.fromJson(Map<String, Object?> json)
factory

Properties

errors List<GraphQLError>
A list of all GraphQLErrors that caused this exception.
no setteroverride
extensions Map<String, Object?>?
Extensions return to the client
final
hashCode int
The hash code for this object.
no setterinherited
locations List<GraphQLErrorLocation>
An optional list of locations within the source text where this error occurred.
final
message String
The reason execution was halted, whether it is a syntax error, or a runtime error, or some other exception.
final
path List<Object>?
List of field names with aliased names or 0‐indexed integers for list
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceError Object?
An optional error Object to pass more information of the source of the problem for logging or other purposes
final
stackTrace StackTrace?
The stack trace of the sourceError
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
override
toString() String
A string representation of this object.
override

Operators

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