hive-router 0.2.0

GraphQL router for Federation, part of the Hive platform
1
2
3
4
5
6
7
8
9
10
11
use graphql_tools::parser::schema::Directive;

pub trait FederationDirective: Ord + PartialOrd {
    fn directive_name() -> &'static str;
    fn is(directive: &Directive<'_, String>) -> bool {
        Self::directive_name() == directive.name
    }
    fn parse(directive: &Directive<'_, String>) -> Self
    where
        Self: Sized;
}