gql_dio_link 1.0.1+1 copy "gql_dio_link: ^1.0.1+1" to clipboard
gql_dio_link: ^1.0.1+1 copied to clipboard

Similar to gql_http_link, gql_dio_link is a GQL Terminating Link to execute requests via Dio using JSON

example/README.md

See https://github.com/gql-dart/gql/tree/master/examples/gql_example_dio_link

final client = dio.Dio();

final Link link = DioLink(
  graphqlEndpoint,
  client: client,
);

final res = await link
  .request(Request(
    operation: Operation(document: gql.parseString(
      """{
        countries(filter:{currency:{eq:"EGP"}}){
          name
        }
      }""",
    )),
  ))
  .first;

final countryName = res.data["countries"][0]["name"] as String;

print("The country that uses EGP as a form of curruncy is ${countryName}");
34
likes
160
pub points
95%
popularity

Publisher

verified publishergql-dart.dev

Similar to gql_http_link, gql_dio_link is a GQL Terminating Link to execute requests via Dio using JSON

Repository (GitHub)
View/report issues

Topics

#graphql #gql #gql-link #dio

Documentation

API reference

License

MIT (license)

Dependencies

dio, gql, gql_exec, gql_link, meta

More

Packages that depend on gql_dio_link