Skip to main content

ResolverDefinition

Trait ResolverDefinition 

Source
pub trait ResolverDefinition: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn output_type(&self) -> &'static str;
    fn computed_methods(&self) -> &'static [ResolverComputedMethod];
    fn evaluate_computed(
        &self,
        method: &str,
        args: &[Value],
    ) -> Result<Value, Box<dyn Error>>;

    // Provided methods
    fn typescript_interface(&self) -> Option<&'static str> { ... }
    fn typescript_schema(&self) -> Option<ResolverTypeScriptSchema> { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn output_type(&self) -> &'static str

Source

fn computed_methods(&self) -> &'static [ResolverComputedMethod]

Source

fn evaluate_computed( &self, method: &str, args: &[Value], ) -> Result<Value, Box<dyn Error>>

Provided Methods§

Implementors§