alice_graphql_client 1.0.2
alice_graphql_client: ^1.0.2 copied to clipboard
A GraphQL adapter for Alice HTTP Inspector. This package provides a GraphQL Link to capture and log GraphQL operations, allowing easy debugging within the Alice UI.
alice_graphql_client #
A GraphQL adapter for Alice.
Usage #
To use Alice with graphql_flutter, add AliceGraphQLLink to your link chain. You can optionally pass the url to properly format the endpoint and server in the Alice inspector.
import 'package:alice/alice.dart';
import 'package:alice_graphql_client/alice_graphql_client.dart';
import 'package:graphql_flutter/graphql_flutter.dart';
final alice = Alice();
final url = 'https://your-api.com/graphql';
final link = Link.from([
AliceGraphQLLink(alice: alice, url: url),
HttpLink(url),
]);
final client = GraphQLClient(
cache: GraphQLCache(),
link: link,
);