StrapiModelQuery class

query to be made aginst single references in the collection model

Implementers

Constructors

StrapiModelQuery({required List<StrapiField> requiredFields})
base strapi graph query this query is made against single reference field which exist in a strapi data/model structure pass requiredFields to be in the response, if the reference field contains repeatable collection object then you must use StrapiCollectionQuery, for complete idea how to use this check StrapiCollectionQuery,

Properties

a StrapiLeafField
getter/setter pair
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
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
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
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
whereModelField({required StrapiModelField field, required StrapiModelQuery query}) → void
query against a field containing single reference to other collection object

Operators

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