Introduction

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

Juniper is a library for creating GraphQL servers in Rust. Build type-safe and fast API servers with minimal boilerplate and configuration (we do try to make declaring and resolving GraphQL schemas as convenient as Rust will allow).

Juniper doesn't include a web server itself, instead, it provides building blocks to make integration with existing web servers straightforward. It optionally provides a pre-built integration for some widely used web server frameworks in Rust ecosystem.

Features

Juniper supports the full GraphQL query language according to the specification (October 2021).

NOTE: As an exception to other GraphQL libraries for other languages, Juniper builds non-null types by default. A field of type Vec<Episode> will be converted into [Episode!]!. The corresponding Rust type for a nullable [Episode] would be Option<Vec<Option<Episode>>> instead.

Integrations

Types

Juniper provides out-of-the-box integration for some very common Rust crates to make building schemas a breeze. The types from these crates will be usable in your schemas automatically after enabling the correspondent self-titled Cargo feature:

Web server frameworks

API stability

Juniper has not reached 1.0 yet, thus some API instability should be expected.