Struct juniper::SchemaType
source · [−]pub struct SchemaType<'a, S> { /* private fields */ }
Expand description
Metadata for a schema
Implementations
pub fn new<QueryT, MutationT, SubscriptionT>(
query_info: &QueryT::TypeInfo,
mutation_info: &MutationT::TypeInfo,
subscription_info: &SubscriptionT::TypeInfo
) -> Self where
S: ScalarValue + 'a,
QueryT: GraphQLType<S>,
MutationT: GraphQLType<S>,
SubscriptionT: GraphQLType<S>,
pub fn new<QueryT, MutationT, SubscriptionT>(
query_info: &QueryT::TypeInfo,
mutation_info: &MutationT::TypeInfo,
subscription_info: &SubscriptionT::TypeInfo
) -> Self where
S: ScalarValue + 'a,
QueryT: GraphQLType<S>,
MutationT: GraphQLType<S>,
SubscriptionT: GraphQLType<S>,
Create a new schema.
Add a directive like skip
or include
.
Get a type by name.
Get a concrete type by name.
Get the query type from the schema.
Get the concrete query type from the schema.
Get the mutation type from the schema.
Get the concrete mutation type from the schema.
Get the subscription type.
Get the concrete subscription type.
Get a list of concrete types.
Get a list of directives.
Get directive by name.
Determine if there is an overlap between types.
A list of possible typeees for a given type.
pub fn is_possible_type(
&self,
abstract_type: &MetaType<'_, S>,
possible_type: &MetaType<'_, S>
) -> bool
pub fn is_possible_type(
&self,
abstract_type: &MetaType<'_, S>,
possible_type: &MetaType<'_, S>
) -> bool
If the abstract type is possible.
If the type is a subtype of another type.
If the type is a named subtype.
Trait Implementations
impl<'a, S: 'a, T> From<&'a SchemaType<'a, S>> for Document<'a, T> where
S: ScalarValue,
T: Text<'a> + Default,
impl<'a, S: 'a, T> From<&'a SchemaType<'a, S>> for Document<'a, T> where
S: ScalarValue,
T: Text<'a> + Default,
Performs the conversion.
type Context = SchemaType<'a, S>
type Context = SchemaType<'a, S>
Context type for this GraphQLValue
. Read more
Type that may carry additional schema information for this GraphQLValue
. Read more
Returns name of the GraphQLType
exposed by this GraphQLValue
. Read more
fn resolve_field(
&self,
_info: &(),
field: &str,
args: &Arguments<'_, S>,
executor: &Executor<'_, '_, Self::Context, S>
) -> ExecutionResult<S>
fn resolve_field(
&self,
_info: &(),
field: &str,
args: &Arguments<'_, S>,
executor: &Executor<'_, '_, Self::Context, S>
) -> ExecutionResult<S>
Resolves the value of a single field on this GraphQLValue
. Read more
Returns the concrete GraphQLType
name for this GraphQLValue
being an interface,
an union or an object. Read more
Resolves this GraphQLValue
(being an interface or an union) into a concrete
downstream object type. Read more
impl<'a, S> GraphQLValueAsync<S> for SchemaType<'a, S> where
S: ScalarValue + 'a,
S: Send + Sync,
Self: Sync,
impl<'a, S> GraphQLValueAsync<S> for SchemaType<'a, S> where
S: ScalarValue + 'a,
S: Send + Sync,
Self: Sync,
Resolves the value of a single field on this GraphQLValueAsync
. Read more
Resolves this GraphQLValueAsync
(being an interface or an union) into a
concrete downstream object type. Read more
Resolves the provided selection_set
against this GraphQLValueAsync
. Read more