GraphQLRequest<T> class

A GraphQL request with a few extra properties used to decode the response or use the correct API if the backend has multiple.

Constructors

GraphQLRequest({String? apiName, required String document, Map<String, dynamic> variables = const <String, dynamic>{}, String? decodePath, ModelType<Model>? modelType})

Properties

apiName String?
Only required if your backend has multiple GraphQL endpoints in the amplifyconfiguration.dart file. This parameter is then needed to specify which one to use for this request.
final
decodePath String?
Only required for custom decoding logic. In most cases, will match the operation name in the document.
final
document String
The body of the request, starting with the operation type and operation name.
final
hashCode int
The hash code for this object.
no setterinherited
id String
final
modelType → ModelType<Model>?
Only required for custom decoding logic. The response will be decoded to this type. For a request of a single instance (like get, update, create or delete):
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
variables Map<String, dynamic>
A map of values to dynamically use for variable names in the document.
final

Methods

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

Operators

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