#futures #async #graphql

async-graphql

The GraphQL server library implemented by rust

43 releases (25 stable)

✓ Uses Rust 2018 edition

new 1.6.8 Mar 31, 2020
1.6.7 Mar 30, 2020
0.10.8 Mar 10, 2020
0.9.4 Mar 7, 2020
0.5.0 Mar 3, 2020

#35 in Asynchronous

Download history 213/week @ 2020-03-03 181/week @ 2020-03-10 520/week @ 2020-03-17 297/week @ 2020-03-24

413 downloads per month
Used in 2 crates

MIT/Apache

300KB
7.5K SLoC

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.

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)
  • Custom extension
  • Apollo Tracing extension
  • Limit query complexity/depth
  • Error Extensions

Integrations

Goals

  • Types
    • Scalar
      • Integer
      • Float
      • String
      • Bool
      • ID
      • DateTime
      • UUID
      • Url
      • ObjectId
    • Containers
      • List
      • Non-Null
    • Object
    • Enum
    • InputObject
      • Field default value
      • Deprecated flag
    • Interface
    • Union
  • 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
    • Introspection
      • Query
      • Disable introspection
    • Multipart Request
    • Cursor Connections
    • Input value validators
      • Custom validator
      • Combination
        • and
        • or
      • Integer
        • IntRange
        • IntLessThan
        • IntGreaterThan
        • IntNonZero
      • String
        • Email
        • MAC
        • StringMinLength
        • StringMaxLength
      • List
        • ListMaxLength
        • ListMinLength
    • Limit query complexity
    • Limit query depth
  • Extensions
    • Custom
    • Apollo tracing
  • 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

References

Contribute

Welcome to contribute !

Dependencies

~10MB
~214K SLoC