castle_types/
directive_trait.rs

1use crate::{Field, Inputs, Next, Value, State};
2
3#[allow(unused_variables)]
4#[async_trait::async_trait]
5pub trait Directive: Send + Sync {
6    async fn field_visitor(
7        &self,
8        field: Field,
9        directive_args: &Inputs,
10        next: Next,
11        context: &State,
12    ) -> Result<Value, anyhow::Error> {
13        next.resolve(field).await
14    }
15}