StrapiCollectionQuery class

Inheritance

Constructors

StrapiCollectionQuery({required dynamic collectionName, required List<StrapiField> requiredFields, int? limit, int? start})
graph query against strapi collection or List of references (think of repeatable references in strapi) in Strapi data structure, you can nest it according to the reference fields that exists in the data structure of the collection model, collectionName is required only for the root query, any collectionName passed to additional queries of a root query are ignored because query will be made against the field name, pass requiredFields to be in the response, limit is the maximum number of documents in the response, start can be used to paginate the queries,

Properties

a StrapiLeafField
getter/setter pairinherited
collectionName String
final
hashCode int
The hash code for this object.
no setterinherited
limit int?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start int?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query({String? collectionName}) String
stringified query, pass the collectionName to replace the original root collectionName in output string
requireCompenentField(StrapiComponentField field, String fields) → void
compenents of strapi models cannot be queried, it isn't supported by strapi as of now, so to include them in the response you have to explicitly pass the field names as String, for example
inherited
toString() String
A string representation of this object.
inherited
whereCollectionField({required StrapiCollectionField field, required StrapiCollectionQuery query}) → void
query against field containing repeatable reference to other collection objects
inherited
whereField({required StrapiLeafField field, required StrapiFieldQuery query, required dynamic value}) → void
used to filter against a field in strapi data structure in collection, field should be a leaf fields, which means it should be a basic data type supported by strapi like Date, String, Number, bool etc throws StrapiException if field isnt truw StrapiLeafField
inherited
whereModelField({required StrapiModelField field, required StrapiModelQuery query}) → void
query against a field containing single reference to other collection object
inherited

Operators

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