mod apollo_tracing;
mod tracing;
pub use self::tracing::Tracing;
use crate::context::{QueryPathNode, ResolveId};
pub use apollo_tracing::ApolloTracing;
pub(crate) type BoxExtension = Box<dyn Extension>;
pub struct ResolveInfo<'a> {
pub resolve_id: ResolveId,
pub path_node: &'a QueryPathNode<'a>,
pub parent_type: &'a str,
pub return_type: &'a str,
}
#[allow(unused_variables)]
pub trait Extension: Sync + Send + 'static {
fn name(&self) -> Option<&'static str> {
None
}
fn parse_start(&self, query_source: &str) {}
fn parse_end(&self) {}
fn validation_start(&self) {}
fn validation_end(&self) {}
fn execution_start(&self) {}
fn execution_end(&self) {}
fn resolve_field_start(&self, info: &ResolveInfo<'_>) {}
fn resolve_field_end(&self, resolve_id: ResolveId) {}
fn result(&self) -> Option<serde_json::Value> {
None
}
}