onUpdate<T extends Model> static method

GraphQLRequest<T> onUpdate<T extends Model>(
  1. ModelType<T> modelType, {
  2. String? apiName,
  3. APIAuthorizationType<AmplifyAuthProvider>? authorizationMode,
  4. Map<String, String>? headers,
  5. QueryPredicate<Model>? where,
})

Generates a subscription request for the update of any instance of the modelType.

final request = ModelSubscriptions.onUpdate(Todo.classType);

Implementation

static GraphQLRequest<T> onUpdate<T extends Model>(
  ModelType<T> modelType, {
  String? apiName,
  APIAuthorizationType? authorizationMode,
  Map<String, String>? headers,
  QueryPredicate? where,
}) {
  return ModelSubscriptionsFactory.instance.onUpdate<T>(
    modelType,
    apiName: apiName,
    authorizationMode: authorizationMode,
    headers: headers,
    where: where,
  );
}