9623e4d326
* Use mdbook for building the book * Update book config * Update book hierarchy to work properly with mdbook This necessitated adding place-holder index pages since mdbook does not suppoert stand-alon menu items * Update tests to use 2018 edition * Fix various compilation errors in the tests
1 KiB
1 KiB
Integrating with Hyper
Hyper is a is a fast HTTP implementation that many other Rust web frameworks leverage. It offers asynchronous I/O via the tokio runtime and works on Rust's stable channel.
Hyper is not a higher-level web framework and accordingly does not include ergonomic features such as simple endpoint routing, baked-in HTTP responses, or reusable middleware. For GraphQL, those aren't large downsides as all POSTs and GETs usually go through a single endpoint with a few clearly-defined response payloads.
Juniper's Hyper integration is contained in the juniper_hyper
crate:
!FILENAME Cargo.toml
[dependencies]
juniper = "0.10"
juniper_hyper = "0.1.0"
Included in the source is a small example which sets up a basic GraphQL and GraphiQL handler.