GraphqlResult<TResult> class

Generic query result based on query result

to use typed data provide fromJson callback and generic TResult

Constructors

GraphqlResult({Map<String, dynamic>? data, required QueryResultSource? source, OperationException? exception, required FromJsonCallback<TResult> fromJsonCallback})

Properties

context ↔ Context
Response context. Defaults to an empty Context()
getter/setter pairinherited
data Map<String, dynamic>?
Response data
getter/setter pairinherited
exception ↔ OperationException?
getter/setter pairinherited
fromJsonCallback FromJsonCallback<TResult>
final
hasException bool
Whether the response includes an exception
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isConcrete bool
data has been specified and is not an QueryResultSource.optimisticResult
no setterinherited
isLoading bool
data has yet to be specified from any source for the most recent operation (including QueryResultSource.optimisticResult)
no setterinherited
isNotLoading bool
data been specified (including QueryResultSource.optimisticResult)
no setterinherited
isOptimistic bool
data has been specified as an QueryResultSource.optimisticResult
no setterinherited
parsedData Object?
If a parserFn is provided, this getter can be used to fetch the parsed data.
no setterinherited
parserFn ↔ ResultParserFn<Object?>
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source ↔ QueryResultSource?
The source of the result data.
getter/setter pairinherited
timestamp DateTime
getter/setter pairinherited
typedData → TResult?
no setter

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

fromQueryResult<TResult>({required QueryResult<Object?> queryResult, required FromJsonCallback<TResult> fromJsonCallback}) GraphqlResult<TResult>