GraphqlProvider class
A Provider fetches raw data and creates Models. An app can have many Providers.
Constructors
- GraphqlProvider({required GraphqlModelDictionary modelDictionary, required Link link})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- link ↔ Link
-
getter/setter pair
- logger → Logger
-
final
- modelDictionary → GraphqlModelDictionary
-
The translation between
Adapters andModelsfinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createRequest<
_Model extends GraphqlModel> ({Query? query, required QueryAction action, Map< String, dynamic> ? variables}) → Request -
delete<
_Model extends GraphqlModel> (_Model instance, {Query? query, ModelRepository< GraphqlModel> ? repository}) → Future<bool> - Remove a model instance
-
exists<
_Model extends GraphqlModel> ({Query? query, ModelRepository< GraphqlModel> ? repository}) → Future<bool> -
Whether a model instance is present.
nullis returned when existence is unknown. The model instance is not hydrated in the function output; aboolvariant (e.g.List<bool>,Map<TModel, bool>) should be returned. -
get<
_Model extends GraphqlModel> ({Query? query, ModelRepository< GraphqlModel> ? repository}) → Future<List< _Model> > -
Query for raw data and construct it with an
Adapter -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryToVariables<
_Model extends GraphqlModel> (Query? query) → Map< String, dynamic> - Remove associations from variables and transform them from field names to document node names.
-
subscribe<
_Model extends GraphqlModel> ({Query? query, ModelRepository< GraphqlModel> ? repository}) → Stream<List< _Model> > -
toString(
) → String -
A string representation of this object.
inherited
-
upsert<
_Model extends GraphqlModel> (_Model instance, {Query? query, ModelRepository< GraphqlModel> ? repository}) → Future<Response> - Insert or update a model instance
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited