simple_gql 1.1.0 copy "simple_gql: ^1.1.0" to clipboard
simple_gql: ^1.1.0 copied to clipboard

outdated

A minimal library to do GraphQL queries and mutations (subscriptions not handled yet)

example/simple_gql_example.dart

import 'package:simple_gql/simple_gql.dart';

void main() async {
  try {
    final response = await GQLClient(
      url: 'https://api.graph.cool/simple/v1/swapi',
    ).query(
      query: r'''
      query {
        allPersons {
          name
          films {
            director
          }
        }
      }
    ''',
    );
    print('Yay, success ! :D');
    print(response);
  } on GQLError catch (e) {
    print('Ouch ! :(');
    print(e);
  } catch (e) {
    print('Probably a network error');
  }
}
8
likes
0
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

A minimal library to do GraphQL queries and mutations (subscriptions not handled yet)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, meta

More

Packages that depend on simple_gql