deleteById<T extends Model> static method
GraphQLRequest<T>
deleteById<T extends Model>(
- ModelType<
T> modelType, - String id, {
- QueryPredicate<
Model> ? where,
Generates a request to delete a model by ID.
final request = ModelMutations.deleteById(Todo.classType, 'some-todo-id-123');
An optional where
parameter can be supplied as a condition for the deletion to be evaluated on the server.
Implementation
static GraphQLRequest<T> deleteById<T extends Model>(
ModelType<T> modelType, String id,
{QueryPredicate? where}) {
return ModelMutationsFactory.instance
.deleteById<T>(modelType, id, where: where);
}