Crate tsukuyomi_juniper[−][src]
A extension of Tsukuyomi web framework for supporting GraphQL serving based on Juniper.
Examples
use tsukuyomi_juniper::{GraphQLState, AppGraphQLExt}; struct Context {/* ... */} impl juniper::Context for Context {} struct Query {/* ... */} graphql_object!(Query: Context |&self| {/* ... */}); struct Mutation {/* ... */} graphql_object!(Mutation: Context |&self| {/* ... */}); let context = Context {/* ... */}; let schema = juniper::RootNode::new(Query {/*...*/}, Mutation {/*...*/}); let state = GraphQLState::new(context, schema); let app = App::builder() .graphql("/graphql", state) .graphiql("/graphiql", "http://localhost:4000/graphql") .finish()?;
Modules
endpoint |
Definitions of |
Structs
Execute |
A |
GraphQLRequest |
A wrapper around an incoming GraphQL request from a client. |
GraphQLResponse |
The result of executing a GraphQL query. |
GraphQLState |
The main type containing all contextual values for processing GraphQL requests. |
Traits
AppGraphQLExt |
A set of extensions for registration of GraphQL endpoints into |
GraphQLExecutor |
Abstraction of an executor which processes asynchronously the GraphQL requests. |