Struct async_graphql::dynamic::SubscriptionField
source · pub struct SubscriptionField { /* private fields */ }
Available on crate feature
dynamic-schema
only.Expand description
A GraphQL subscription field
Implementations
sourceimpl SubscriptionField
impl SubscriptionField
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>) -> SubscriptionFieldFuture<'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>) -> SubscriptionFieldFuture<'a> + Send + Sync + 'static,
Create a GraphQL subscription field
sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description
sourcepub fn deprecation(self, reason: Option<&str>) -> Self
pub fn deprecation(self, reason: Option<&str>) -> 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 subscription field
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SubscriptionField
impl Send for SubscriptionField
impl Sync for SubscriptionField
impl Unpin for SubscriptionField
impl !UnwindSafe for SubscriptionField
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