list<T extends Model> static method

GraphQLRequest<PaginatedResult<T>> list<T extends Model>(
  1. ModelType<T> modelType, {
  2. int? limit,
  3. QueryPredicate<Model>? where,
})

Generates a request for a list of model instances.

final request = ModelQueries.list(Todo.classType);

or filter the query with some conditions:

final request = ModelQueries.list(Todo.classType, where: Todo.NAME.contains('walk the dog'));

Implementation

static GraphQLRequest<PaginatedResult<T>> list<T extends Model>(
  ModelType<T> modelType, {
  int? limit,
  QueryPredicate? where,
}) {
  return ModelQueriesFactory.instance
      .list<T>(modelType, limit: limit, where: where);
}