Struct async_graphql::dynamic::Field
source · pub struct Field { /* private fields */ }
Available on crate feature
dynamic-schema
only.Expand description
A GraphQL field
Implementations
sourceimpl Field
impl Field
sourcepub fn new<N, T, F>(name: N, ty: T, resolver_fn: F) -> Selfwhere
N: Into<String>,
T: Into<TypeRef>,
F: for<'a> Fn(ResolverContext<'a>) -> FieldFuture<'a> + Send + Sync + 'static,
pub fn new<N, T, F>(name: N, ty: T, resolver_fn: F) -> Selfwhere
N: Into<String>,
T: Into<TypeRef>,
F: for<'a> Fn(ResolverContext<'a>) -> FieldFuture<'a> + Send + Sync + 'static,
Create a GraphQL field
sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description
sourcepub fn argument(self, input_value: InputValue) -> Self
pub fn argument(self, input_value: InputValue) -> Self
Add an argument to the field
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl !UnwindSafe for Field
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more