Crate async_graphql

source ·
Expand description

§A GraphQL server library implemented in Rust

§Documentation

§Features

  • Fully supports async/await
  • Type safety
  • Rustfmt friendly (Procedural Macro)
  • Custom scalars
  • Minimal overhead
  • Easy integration (poem, actix_web, tide, warp, rocket …)
  • File upload (Multipart request)
  • Subscriptions (WebSocket transport)
  • Custom extensions
  • Apollo Tracing extension
  • Limit query complexity/depth
  • Error Extensions
  • Apollo Federation(v2)
  • Batch Queries
  • Apollo Persisted Queries

§Crate features

This crate offers the following features, all of which are not activated by default:

§Integrations

§License

Licensed under either of

§References

§Examples

All examples are in the sub-repository, located in the examples directory.

Run an example:

git submodule update # update the examples repo
cd examples && cargo run --bin [name]

§Benchmarks

Ensure that there is no CPU-heavy process in background!

cd benchmark
cargo bench

Now a HTML report is available at benchmark/target/criterion/report.

Re-exports§

  • pub use base::ComplexObject;
  • pub use base::Description;
  • pub use custom_directive::CustomDirectiveFactory;
  • pub use custom_directive::TypeDirective;
  • pub use extensions::ResolveFut;
  • pub use parser::Pos;
  • pub use parser::Positioned;
  • pub use resolver_utils::ContainerType;
  • pub use resolver_utils::EnumType;
  • pub use resolver_utils::ScalarType;
  • pub use schema::SchemaEnv;
  • pub use validation::VisitorContext;
  • pub use async_graphql_parser as parser;
  • pub use context::*;
  • pub use types::*;

Modules§

Macros§

Structs§

Enums§

Traits§

Functions§

  • Interpret a ConstValue as an instance of type T.
  • Convert a T into ConstValue which is an enum that can represent any valid GraphQL data.

Type Aliases§

Attribute Macros§

Derive Macros§