GraphQLResult class
A result from a GraphQL request.
Constructors
-
GraphQLResult(Object? data, {List<
GraphQLError> errors = const [], bool didExecute = true, Map<String, Object?> ? extensions}) -
errors should not be empty when didExecute is false
const
Properties
- data → Object?
-
A Stream
final
- didExecute → bool
-
When didExecute is true, data is returned in the response
final
-
errors
→ List<
GraphQLError> -
The
GraphQLError
s found during processing of the requestfinal -
extensions
→ Map<
String, Object?> ? -
A serializable map containing custom values which
give additional information to the client
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSubscription → bool
-
Whether this result is for a subscription
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subscriptionStream
→ Stream<
GraphQLResult> ? -
The stream of
GraphQLResult
if this result is for a subscriptionno setter
Methods
-
copyWith(
{Val< Object?> ? data, List<GraphQLError> ? errors, bool? didExecute, Val<Map< ? extensions}) → GraphQLResultString, Object?> ?> - Copies this overriding the values passes as arguments
-
copyWithExtension(
String key, Object? value) → GraphQLResult -
Copies this and assigns
value
for thekey
in the extensions Map if the new GraphQLResult. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Returns a Json Map following https://spec.graphql.org/October2021/#sec-Response
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited