Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

GraphQL server library for Rust

License

NotificationsYou must be signed in to change notification settings

graphql-rust/juniper

Repository files navigation

Juniper

GraphQL server library for Rust

Build StatuscodecovCrates.ioGitter chat


GraphQL is a data query language developed by Facebook intended toserve mobile and web application frontends.

Juniper makes it possible to write GraphQL servers in Rust that aretype-safe and blazingly fast. We also try to make declaring and resolvingGraphQL schemas as convenient as Rust will allow.

Juniper does not include a web server - instead it provides building blocks tomake integration with existing servers straightforward. It optionally provides apre-built integration for theActix,Hyper,Rocket, andWarp frameworks, includingembeddedGraphiql andGraphQL Playground for easy debugging.

The book is also available for the master branch and older versions published after 0.11.1. See thebook index.

Getting Started

The best place to get started is theJuniper Book, which containsguides with plenty of examples, covering all features of Juniper. (very much WIP)

To get started quickly and get a feel for Juniper, check out theQuickstart section.

For specific information about macros, types and the Juniper api, theAPI Reference is the best place to look.

You can also check out theStar Wars schema to see a complexexample including polymorphism with traits and interfaces.For an example of web framework integration,see theactix,axum,hyper,rocket, andwarp examples folders.

Features

Juniper supports the full GraphQL query language according to thespecification (October 2021), including interfaces, unions, schemaintrospection, and validations. It can also output the schema in theGraphQL Schema Language.

As an exception to other GraphQL libraries for other languages, Juniper buildsnon-null types by default. A field of typeVec<Episode> will be converted into[Episode!]!. The corresponding Rust type for e.g.[Episode] would beOption<Vec<Option<Episode>>>.

Juniper is agnostic to serialization format and network transport.

Juniper supports both asynchronous and synchronous execution usingexecute() andexecute_sync() respectively. Asynchronous execution is runtime agnostic.

Juniper follows acode-first approach to defining GraphQL schemas. If you would like to use aschema-first approach instead, considerjuniper-from-schema for generating code from a schema file.

Integrations

Data types

Juniper has automatic integration with some very common Rust crates to makebuilding schemas a breeze. The types from these crates will be usable inyour Schemas automatically.

Web Frameworks

Guides & Examples

API Stability

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


[8]ページ先頭

©2009-2025 Movatter.jp