219 releases (stable)

new 2.5.5 Feb 22, 2021
2.5.0 Jan 17, 2021
2.4.3 Dec 28, 2020
2.1.4 Nov 23, 2020
0.10.8 Mar 10, 2020

#8 in #graphql

Download history 3663/week @ 2020-10-31 4119/week @ 2020-11-07 3742/week @ 2020-11-14 3405/week @ 2020-11-21 3360/week @ 2020-11-28 3003/week @ 2020-12-05 3432/week @ 2020-12-12 2166/week @ 2020-12-19 2026/week @ 2020-12-26 4227/week @ 2021-01-02 3529/week @ 2021-01-09 2934/week @ 2021-01-16 2707/week @ 2021-01-23 3090/week @ 2021-01-30 3191/week @ 2021-02-06 4126/week @ 2021-02-13

13,285 downloads per month
Used in 11 crates (via async-graphql)

MIT/Apache

245KB
5.5K 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

~3.5MB
~75K SLoC