#graphql #serverless #authentication


Diana is an out-of-the-box GraphQL system with full support for use as a serverless function, as well as commonly-used features like subscriptions and authentication

12 releases

0.2.9 Aug 3, 2021
0.2.8 Jul 11, 2021
0.2.1 Jun 30, 2021
0.1.1 Jun 28, 2021

#731 in HTTP server

Download history 59/week @ 2023-06-07 118/week @ 2023-06-14 48/week @ 2023-06-21 19/week @ 2023-06-28 39/week @ 2023-07-05 12/week @ 2023-07-12 22/week @ 2023-07-19 13/week @ 2023-07-26 7/week @ 2023-08-02 12/week @ 2023-08-09 23/week @ 2023-08-16 17/week @ 2023-08-23 18/week @ 2023-08-30 29/week @ 2023-09-06 12/week @ 2023-09-13 6/week @ 2023-09-20

66 downloads per month
Used in 2 crates

MIT license

878 lines


Pragmatic GraphQL that just works.

BookCrate PageAPI DocumentationContributing

Diana is a GraphQL system for Rust that's designed to work as simply as possible out of the box, without sacrificing configuration ability. Unlike other GraphQL systems, Diana fully supports serverless functions and automatically integrates them with a serverful subscriptions system as needed, and over an authenticated channel. GraphQL subscriptions are stateful, and so have to be run in a serverful way. Diana makes this process as simple as possible.

Diana's documentation can be found in the book.


Getting started with Diana is really easy! Just install it by adding this to your Cargo.toml file:

diana = "0.2.9"

Due to the complexity of its components, Diana does have a lot of dependencies, so you may want to go and have a cup of tea while you wait for the installation and everything to be compiled for the first time!

Because of its structure, Diana needs you to run two servers in development. While it may be tempting to just combine these into one, this will not work whatsoever and it will blow up in your face (schema collisions)! You can either have two binaries or, using our recommended method, create a monorepo-style crate with two binary crates and a library crate to store your common logic (example in the book).

All further documentation can be found in the book, which was made with mdBook.


Each Diana integration depends on the core library, so any change of the core library will result in a version change for an integration. That is also applied backwards in that any version change in an integration also results in a version change of the core and all other integrations. Essentially, the whole of Diana will always be at a certain version, the latest tag of this repository.

When a new version is added, it will begin in v0.1.0. Once it moves to a stable release, what would otherwise be v1.0.0, it is immediately bumped to the same version as the rest of the Diana ecosystem.


Diana is under active development, and still requires the particular addition of support for authentication over WebSockets. The project will hopefully move to v1.0.0 by 2022!

Credit to async_graphql

async_graphql must be acknowledged as the primary dependency of Diana, as well as the biggest inspiration for the project. It is a fantastic GraphQL library for Rust, and if you want to go beyond the scope of Diana (which is more high-level), this should be your first port of call. Without it, Diana would not be possible at all.

Why the name?

Diana is the Roman name for the Greek goddess Artemis, the sister of the god Apollo. Apollo GraphQL is a company that builds excellent GraphQL products (with which Diana is NOT in any way affiliated), so we may as well be in the same nominal family (if that's a thing).


  • Support GraphiQL in production
  • Support authentication over WebSockets for subscriptions
  • Support GraphiQL over serverless


If you want to make a contribution to Diana, that's great! Thanks so much! Contributing guidelines can be found here, and please make sure you follow our code of conduct.




~812K SLoC