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§
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 description
sourcepub fn argument(self, input_value: InputValue) -> Self
pub fn argument(self, input_value: InputValue) -> Self
Add an argument to the subscription field