async-graphql/docs/en/src/apollo_tracing.md

15 lines
524 B
Markdown
Raw Normal View History

2020-04-15 03:15:30 +00:00
# Apollo Tracing
2020-05-09 21:39:04 +00:00
Apollo Tracing provides performance analysis results for each step of query. This is an extension to `Schema`, and the performance analysis results are stored in `QueryResponse`.
2020-09-01 05:47:22 +00:00
To enable the Apollo Tracing extension, add the extension when the `Schema` is created.
2020-05-09 21:39:04 +00:00
```rust
use async_graphql::*;
use async_graphql::extensions::ApolloTracing;
let schema = Schema::build(Query, EmptyMutation, EmptySubscription)
2020-09-01 05:47:22 +00:00
.extension(ApolloTracing::default) // Enable ApolloTracing extension
2020-05-09 21:39:04 +00:00
.finish();
2020-09-01 05:47:22 +00:00
```