otel_graphql_flutter 0.1.0 copy "otel_graphql_flutter: ^0.1.0" to clipboard
otel_graphql_flutter: ^0.1.0 copied to clipboard

Flutter overlay for `otel_graphql`. Re-exports the core OpenTelemetry gql Link and pulls in `graphql_flutter`, so one dependency covers every GraphQL operation.

otel_graphql_flutter #

Flutter overlay for otel_graphql.

Re-exports the core OTelGraphqlLink and pulls in graphql_flutter so Flutter apps add one dependency instead of managing graphql + graphql_flutter + otel_graphql separately.

import 'package:otel_graphql_flutter/otel_graphql_flutter.dart';
import 'package:graphql_flutter/graphql_flutter.dart';

final client = GraphQLClient(
  link: Link.from([
    OTelGraphqlLink(),
    HttpLink('https://api.example.com/graphql'),
  ]),
  cache: GraphQLCache(),
);

Choosing this vs. otel_graphql #

  • Flutter app using graphql_flutter → use this package. One dependency for the link + graphql_flutter.
  • Pure-Dart graphql app (a server, CLI, isolate) → use otel_graphql directly. No Flutter dependency.

The runtime behavior is identical — same OTelGraphqlLink class in both cases.

What this package adds beyond re-exports #

Nothing today, by design. GraphQL instrumentation hooks at the Link chain level, which works the same whether you're using graphql_flutter's widgets or graphql directly. If a future Flutter-shaped affordance becomes worth shipping (a GraphQLProvider wrapper that auto-installs the link, say), it lands here.

License #

Apache 2.0 — see LICENSE.

0
likes
160
points
82
downloads

Documentation

API reference

Publisher

verified publisherdartastic.io

Weekly Downloads

Flutter overlay for `otel_graphql`. Re-exports the core OpenTelemetry gql Link and pulls in `graphql_flutter`, so one dependency covers every GraphQL operation.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

dartastic_opentelemetry, dartastic_opentelemetry_api, flutter, graphql_flutter, otel_graphql

More

Packages that depend on otel_graphql_flutter