Go to file
Anna 1dd153fe08 feat: hack for axum git 2022-10-12 10:42:07 -04:00
.github Remove stale bot 2022-10-06 08:18:01 +08:00
derive Release 4.0.15 2022-10-07 16:51:31 +08:00
docs docs: Fix `&str` -> `ID` in fed docs 2022-09-23 11:58:30 -06:00
examples@bb0fa78205 Skip tracing for introspection queries #841 2022-10-01 16:17:27 +08:00
integrations feat: hack for axum git 2022-10-12 10:42:07 -04:00
parser Release 4.0.15 2022-10-07 16:51:31 +08:00
src Change `SchemaBuilder::enable_suggestions` to `disable_suggestions` 2022-10-07 16:47:55 +08:00
tests test: Fix out of date federation tests 2022-09-23 11:39:42 -06:00
value Release 4.0.15 2022-10-07 16:51:31 +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 Clippy clean 2022-04-28 12:14:23 +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 2022-10-07 17:07:36 +08:00
Cargo.toml Release 4.0.15 2022-10-07 16:51:31 +08:00
LICENSE-APACHE Release 2.10.3 2021-10-12 18:22:48 +08:00
LICENSE-MIT Release 2.10.3 2021-10-12 18:22:48 +08:00
README.md Release 4.0.15 2022-10-07 16:51:31 +08:00
SECURITY.md Fix possible stack overflow in validator. 2022-01-28 09:46:14 +08:00



a high-performance graphql server library that's fully specification compliant

Book中文文档DocsGitHub repositoryCargo package

ci status code coverage Unsafe Rust forbidden Crates.io version docs.rs docs downloads PRs Welcome

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

struct Query;

impl Query {
  fn howdy(&self) -> &'static str {

async fn main() {
    let schema = Schema::build(Query, EmptyMutation, EmptySubscription).finish();

    let app = Route::new()

    println!("GraphiQL: http://localhost:8000");


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

Note: Minimum supported Rust version: 1.59.0 or later


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

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


Integrations are what glue async-graphql with your web server, here are provided ones, or you can build your own!

Crate features

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

feature enables
apollo_tracing Enable the Apollo tracing extension.
apollo_persisted_queries Enable the Apollo persisted queries extension.
log Enable the logger extension.
tracing Enable the tracing extension.
opentelemetry Enable the OpenTelemetry extension.
unblock Support asynchronous reader for Upload
bson Integrate with the bson crate.
chrono Integrate with the chrono crate.
chrono-tz Integrate with the chrono-tz crate.
url Integrate with the url crate.
uuid Integrate with the uuid crate.
uuid08 Integrate with the uuid 0.8 crate.
string_number Enable the StringNumber.
dataloader Support DataLoader.
secrecy Integrate with the secrecy crate.
decimal Integrate with the rust_decimal crate.
bigdecimal Integrate with the bigdecimal crate.
cbor Support for serde_cbor.
smol_str Integrate with the smol_str crate.
hashbrown Integrate with the hashbrown crate.
time Integrate with the time crate.
tokio-sync Integrate with the tokio::sync::RwLock and tokio::sync::Mutex.
fast_chemail Integrate with the fast_chemail crate.


One of the tools used to monitor your graphql server in production is Apollo Studio. Apollo Studio is a cloud platform that helps you build, monitor, validate, and secure your organization's data graph. Add the extension crate async_graphql_apollo_studio_extension to make this avaliable.

Who's using async-graphql in production?

Community Showcase

  • rust-actix-graphql-sqlx-postgresql Using GraphQL with Rust and Apollo Federation
  • entity-rs A simplistic framework based on TAO, Facebook's distributed database for Social Graph.
  • vimwiki-server Provides graphql server to inspect and manipulate vimwiki files.
  • Diana Diana is a GraphQL system for Rust that's designed to work as simply as possible out of the box, without sacrificing configuration ability.
  • cindythink
  • sudograph

Blog Posts



Licensed under either of