The GraphQL server library implemented by rust
async-graphql
is a GraphQL server library that fully supports async/await and is easy to use.
It supports all of the GraphQL specifications and is easy to integrate into existing web servers.
Documentation
- GitHub repository
- Cargo package
- Minimum supported Rust version: 1.40 or later
Example
cargo run --example actix-web
Open http://localhost:8000
in browser
Features
- Fully support async/await
- Type safety
- Rustfmt friendly (Procedural Macro)
- Custom scalar
- Minimal overhead
- Easy integration (hyper, actix_web, tide ...)
- Upload files (Multipart request)
- Subscription (WebSocket transport
Integrations
- Actix-web async-graphql-actix-web
Goals
- Types
- Scalar
- Integer
- Float
- String
- Bool
- ID
- DateTime
- UUID
- Containers
- List
- Non-Null
- Object
- Enum
- InputObject
- Field default value
- Deprecated flag
- Interface
- Union
- Scalar
- Query
- Fields
- Arguments
- Default value
- Deprecated flag
- Alias
- Fragments
- Inline fragments
- Operation name
- Variables
- Default value
- Parse value
- Directives
- @include
- FIELD
- FRAGMENT_SPREAD
- INLINE_FRAGMENT
- @skip
- FIELD
- FRAGMENT_SPREAD
- INLINE_FRAGMENT
- @include
- Schema
- Multipart Request (https://github.com/jaydenseric/graphql-multipart-request-spec)
- Actix-web
- Cursor Connections
- Subscription
- Filter
- WebSocket transport
- Validation rules
- ArgumentsOfCorrectType
- DefaultValuesOfCorrectType
- FieldsOnCorrectType
- FragmentsOnCompositeTypes
- KnownArgumentNames
- KnownDirectives
- KnownFragmentNames
- KnownTypeNames
- LoneAnonymousOperation
- NoFragmentCycles
- NoUndefinedVariables
- NoUnusedFragments
- NoUnusedVariables
- OverlappingFieldsCanBeMerged
- PossibleFragmentSpreads
- ProvidedNonNullArguments
- ScalarLeafs
- UniqueArgumentNames
- UniqueFragmentNames
- UniqueOperationNames
- UniqueVariableNames
- VariablesAreInputTypes
- VariableInAllowedPosition
- Integration examples
- Actix-web
- Hyper
- Tide
License
Licensed under either of
- Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.