Easily execute Hasura's query and mutations, without the need of any other package.
Features
- Query
- Upsert (mutation)
- rawQuery
- rawMutation
Getting started
Add mobidev_hasura to your pubspec.yaml
import the package:
import 'package:mobidev_hasura/mobidev_hasura.dart';
Usage
var hasura = Hasura(
endpoint: 'https://myendpoint.com/v1/graphql',
token: 'my jwt token here'
);
var result = await hasura.query(table: 'customers', fields: {
'name',
'address',
'phone'
}, where: {
'name': {'_eq': 'josh'}
});
if (result.isOk) {
Map<String, dynamic> myRetrievedData = result.body;
//Do anything with your data
}
Additional information
This is the initial release.
New features will be added soon.