221 stable releases

new 2.5.1 Jan 20, 2021
2.4.3 Dec 23, 2020
2.1.6 Nov 30, 2020
1.18.2 Sep 23, 2020
0.10.8 Mar 10, 2020

#7 in Asynchronous

Download history 2578/week @ 2020-09-30 2693/week @ 2020-10-07 2998/week @ 2020-10-14 2899/week @ 2020-10-21 3384/week @ 2020-10-28 3956/week @ 2020-11-04 3820/week @ 2020-11-11 3791/week @ 2020-11-18 3336/week @ 2020-11-25 3171/week @ 2020-12-02 3204/week @ 2020-12-09 3372/week @ 2020-12-16 1971/week @ 2020-12-23 2982/week @ 2020-12-30 4006/week @ 2021-01-06 3138/week @ 2021-01-13

14,189 downloads per month
Used in 10 crates (9 directly)

MIT/Apache

740KB
20K SLoC

A GraphQL server library implemented in Rust

Async-graphql is a high-performance server-side library that supports all GraphQL specifications.

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Features

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

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]

Benchmark

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

cd benchmark

#measure all with system malloc
cargo bench

#measure only chat run
cargo bench -- "chat run"

#measure all with jemalloc
cargo bench --features jemalloc

#measure only simple run with jemalloc
cargo bench --features jemalloc -- "simple run"

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

Read more here: https://bheisler.github.io/criterion.rs/book/criterion_rs.html

Integrations

License

Licensed under either of

References

Contribute

Welcome to contribute !

Dependencies

~12MB
~275K SLoC