GraphqlProvider class

A Provider fetches raw data and creates Models. An app can have many Providers.

Constructors

GraphqlProvider({required GraphqlModelDictionary modelDictionary, required Link link, String? variableNamespace})
A Provider fetches raw data from GraphQL and creates Models. An app can have many Providers.

Properties

hashCode int
The hash code for this object.
no setterinherited
The invoking Link used to access the GraphQL API. Can be overriden by repositories.
getter/setter pair
logger → Logger
Internal use logger.
final
modelDictionary GraphqlModelDictionary
The translation between Adapters and Models
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
variableNamespace String?
Include all variables within a top-level key.
final

Methods

delete<TModel extends GraphqlModel>(TModel instance, {Query? query, ModelRepository<GraphqlModel>? repository}) Future<bool>
Remove a model instance
exists<TModel extends GraphqlModel>({Query? query, ModelRepository<GraphqlModel>? repository}) Future<bool>
Whether a model instance is present. null is returned when existence is unknown. The model instance is not hydrated in the function output; a bool variant (e.g. List<bool>, Map<TModel, bool>) should be returned.
get<TModel extends GraphqlModel>({Query? query, ModelRepository<GraphqlModel>? repository}) Future<List<TModel>>
Query for raw data and construct it with an Adapter
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subscribe<TModel extends GraphqlModel>({Query? query, ModelRepository<GraphqlModel>? repository}) Stream<List<TModel>>
Invokes the subscribe GraphQL operation and returns a Stream of Models. The GraphQL API must support subscriptions.
toString() String
A string representation of this object.
inherited
upsert<TModel extends GraphqlModel>(TModel instance, {Query? query, ModelRepository<GraphqlModel>? repository}) Future<Response?>
Insert or update a model instance

Operators

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