pub struct SubscriptionField { /* private fields */ }Available on crate feature
dynamic-schema only.Expand description
A GraphQL subscription field
Implementations§
Source§impl 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 deprecation
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 Freeze for SubscriptionField
impl !RefUnwindSafe for SubscriptionField
impl Send for SubscriptionField
impl Sync for SubscriptionField
impl Unpin for SubscriptionField
impl !UnwindSafe for SubscriptionField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more