HasuraConnect class

Base Class HasuraConnect

Constructors

HasuraConnect(String url, {int? reconnectionAttempt, List<Interceptor>? interceptors, Map<String, String>? headers, Client httpClientFactory()?})
HasuraConnect constructor

Properties

controller StreamController
controller variable receiving a StreamController.broadcast()
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
headers variable type Map
final
isConnected bool
isConnected variable type bool
no setter
reconnectionAttempt int?
reconnectionAttempt variable type int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapmap Map<String, Snapshot>
snapmap variable type Map
final
url String
url variable type String
final

Methods

disconnect() Future<void>
Disconect from Hasura
dispose() Future
Method dispose Closes the controller,cancels the _subscription and disconnect from Hasura
executeMutation(Query query) Future
Execute a Mutation from a Query
executeQuery(Query query) Future
Execute a Query the method receives a type Query value
executeSubscription(Query query) Future<Snapshot>
Execute a Subscription from a Query
mutation(String document, {Map<String, dynamic>? variables, bool tryAgain = true, String? key, Map<String, String>? headers}) Future
Execute a Mutation from a Document
normalizeStreamValue(Map data) Future<void>
Method normalizeStreamValue Receives a data and check the next steps depending on the data values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String document, {String? key, Map<String, dynamic>? variables, Map<String, String>? headers}) Future
Execute a Query from a Document
querySubscription(Query query) String
Method querySubscription receives a query and convert it to json format
rootStreamListener(dynamic data) → void
Method rootStreamListener Receives a data and creates a Snapshot
sendToWebSocketServer(String input) → void
Method sendToWebSocketServer Receives an input, verifies if _connector is different from null, in this case, will add into the _connector the input
subscription(String document, {String? key, Map<String, dynamic>? variables, Map<String, String>? headers}) Future<Snapshot>
Execute a Subscription from a Document
toString() String
A string representation of this object.
inherited

Operators

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