Go to file
Sunli 4f47703118 Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
.github Enable CI for nightly 2021-02-13 09:59:18 +08:00
benchmark Release 2.4.10 2021-01-14 19:23:37 +08:00
derive Release 2.5.13 2021-03-10 09:25:21 +08:00
docs Update subscription.md 2021-03-09 22:34:29 +09:00
examples@b36b5c4454 Add subscription support for tide with tide-websockets. 2021-02-06 09:21:35 +08:00
integrations Release 2.5.13 2021-03-10 09:25:21 +08:00
parser Release 2.5.9 2021-02-28 09:42:39 +08:00
src Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
tests Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
value Release 2.5.9 2021-02-28 09:42:39 +08:00
.gitignore Moved benchmark from side repo 2020-06-01 21:05:37 +05:00
.gitmodules Update dependencies and make examples submodule 2020-10-15 20:48:06 +01:00
.rustfmt.toml Rustfmt 2020-06-06 15:48:21 +08:00
ARCHITECTURE.md Rename InputValueType to InputType and OutputValueType to OutputType. 2020-12-11 15:37:50 +08:00
CHANGELOG.md Update CHANGELOG.md 2021-03-10 09:24:34 +08:00
Cargo.toml Switch the async runtime used for testing to Tokio. 2021-03-12 12:47:24 +08:00
LICENSE-APACHE add some files 2020-03-01 21:56:14 +08:00
LICENSE-MIT add some files 2020-03-01 21:56:14 +08:00
README.md Add "Unsafe Forbidden" Badge to the README 2020-11-05 13:50:43 -06:00
feature-comparison.md Update feature-comparsion.md #377 2021-01-06 19:54:48 +08:00

README.md

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 !