hyperlane-plugin-graphql 23.3.1

A zero-external-parser GraphQL over HTTP plugin for the Hyperlane framework featuring a recursive-descent GraphQL query parser, depth and complexity DoS limits, XxHash3_64 query/mutation resolver registries, variable binding, and GraphQL-over-HTTP POST/GET dispatch.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

/// Resolver trait for a single top-level GraphQL query or mutation root field.
pub trait GraphqlResolver: Send + Sync + 'static {
    /// Resolves a GraphQL root field given its parsed selection arguments and variables.
    ///
    /// # Arguments
    ///
    /// - `&GraphqlFieldArgs` - Parsed field arguments and variable bindings.
    ///
    /// # Returns
    ///
    /// - `Result<Value, String>` - Resolved JSON value or GraphQL execution error message.
    fn resolve(&self, args: &GraphqlFieldArgs) -> Result<Value, String>;
}