DartpolloClient constructor

DartpolloClient(
  1. String graphQLEndpoint, {
  2. Client? httpClient,
})

Instantiate an DartpolloClient.

DedupeLink and HttpLink are included. To use different Link create an DartpolloClient with DartpolloClient.fromLink.

Implementation

factory DartpolloClient(
  String graphQLEndpoint, {
  http.Client? httpClient,
}) {
  final httpLink = HttpLink(
    graphQLEndpoint,
    httpClient: httpClient,
  );
  return DartpolloClient.fromLink(
    Link.from([
      DedupeLink(),
      httpLink,
    ]),
  ).._httpLink = httpLink;
}