ModelMutations class

Static helpers to generate mutation GraphQLRequest instances from models generated by Amplify codegen.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

create<T extends Model>(T model, {String? apiName, APIAuthorizationType<AmplifyAuthProvider>? authorizationMode, Map<String, String>? headers}) GraphQLRequest<T>
Generates a request to create a model.
delete<T extends Model>(T model, {QueryPredicate<Model>? where, String? apiName, Map<String, String>? headers, APIAuthorizationType<AmplifyAuthProvider>? authorizationMode}) GraphQLRequest<T>
Generates a request to delete a model.
deleteById<T extends Model>(ModelType<T> modelType, ModelIdentifier<T> modelIdentifier, {QueryPredicate<Model>? where, String? apiName, APIAuthorizationType<AmplifyAuthProvider>? authorizationMode, Map<String, String>? headers}) GraphQLRequest<T>
Generates a request to delete a model by ModelIdentifier.
update<T extends Model>(T model, {QueryPredicate<Model>? where, String? apiName, APIAuthorizationType<AmplifyAuthProvider>? authorizationMode, Map<String, String>? headers}) GraphQLRequest<T>
Generates a request to update a model instance.