このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

This page lists integrated libraries you can use for Flutter applications.

Datadog provides datadog_gql_link for use with most GraphQL Flutter libraries, including graphql_flutter and ferry.

Setup

Add datadog_gql_link to your pubspec.yaml or by running flutter pub add datadog_gql_link from your terminal:

dependencies:
  # Other dependencies
  datadog_gql_link: ^1.0.0

When creating your GraphQL link, add the DatadogGqlLink above your terminating link. For example:

final graphQlUrl = "https://example.com/graphql";

final link = Link.from([
  DatadogGqlLink(DatadogSdk.instance, Uri.parse(graphQlUrl)),
  HttpLink(graphQlUrl),
]);

If you are tracking non-GraphQL network calls with datadog_tracking_http_client, you need to configure the tracking plugin to ignore requests to your GraphQL endpoint. Otherwise, GraphQL resources will be reported twice, and APM traces may be broken. Ignore your GraphQL endpoint by using the ignoreUrlPatterns parameter added to datadog_tracking_http_client version 2.1.0.

final datadogConfig = DatadogConfiguration(
    // Your configuration
  )..enableHttpTracking(
      ignoreUrlPatterns: [
        RegExp('example.com/graphql'),
      ],
    );

Further Reading

お役に立つドキュメント、リンクや記事: