Component evidence

Async GraphQL Value Resolver (types/async_await.rs)

juniper · juniper/src/types/async_await.rs · rust · BSD-2-Clause
integrationdev-toolslang:rusttag:async

A Rust trait extension for Juniper that enables asynchronous resolution of GraphQL fields. Use this to implement non-blocking data fetching in GraphQL APIs.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/graphql-rust/juniper | License: BSD-2-Clause | Copyright 2016-2026  Magnus Hallin <mhallin@fastmail.com>,
// Provided via justclaw.it.com; keep this notice with the code.
use std::future;

use auto_enums::enum_derive;

use crate::{
    ast::Selection,
    executor::{ExecutionResult, Executor},
    parser::Spanning,
    value::{DefaultScalarValue, Object, ScalarValue, Value},
};

use crate::BoxFuture;

use super::base::{Arguments, GraphQLType, GraphQLValue, is_excluded, merge_key_into};

/// Extension of [`GraphQLValue`] trait with asynchronous queries/mutations resolvers.
///
/// Convenience macros related to asynchronous queries/mutations expand into an implementation of
/// this trait and [`GraphQLValue`] for the given type.
pub trait GraphQLValueAsync<S = D

... (truncated -- full source via MCP)