faunadb_http 0.13.3 copy "faunadb_http: ^0.13.3" to clipboard
faunadb_http: ^0.13.3 copied to clipboard

A pure Dart implementation of a FaunaDB client and provides query classes that closely mimic FQL functions.

example/main.dart

import 'package:faunadb_http/faunadb_http.dart';
import 'package:faunadb_http/query.dart';

/*
* FaunaDB secret should be the first argument
* `dart ./main.dart <your_secret_here>`
* */
void main(List<String> arguments) async {
  final config = FaunaConfig.build(
    secret: arguments[0],
  );
  // Or if you want to put your secret straight in your code
  // final config = FaunaDBConfig.build(secret: '<your_secret_here>');
  final client = FaunaClient(config);

  final query =
      Identify(Ref(Collection("users"), "284854841250939405"), "test");
  print('query=>\n$query');

  final response = await client.query(query);
  if (response.hasErrors) {
    print('error=>\n${response.errors}');
  } else {
    print('response=>\n${response.resource}');
  }

  client.close();
}
54
likes
120
pub points
17%
popularity

Publisher

verified publishergavans.work

A pure Dart implementation of a FaunaDB client and provides query classes that closely mimic FQL functions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http, json_annotation

More

Packages that depend on faunadb_http