A GraphQL server library implemented in Rust

Overview

A GraphQL server library implemented in Rust

Async-graphql is a high-performance server-side library that supports all GraphQL specifications.

Safety

This crate uses #![forbid(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Features

  • Fully supports async/await
  • Type safety
  • Rustfmt friendly (Procedural Macro)
  • Custom scalars
  • Minimal overhead
  • Easy integration (actix_web, tide, warp, rocket ...)
  • Upload files (Multipart request)
  • Subscriptions (WebSocket transport)
  • Custom extensions
  • Apollo Tracing extension
  • Limit query complexity/depth
  • Error Extensions
  • Apollo Federation
  • Batch Queries
  • Apollo Persisted Queries

Examples

All examples are in the sub-repository, located in the examples directory.

Run an example:

git submodule update # update the examples repo
cd examples && cargo run --bin [name]

Benchmark

Ensure that there is no CPU-heavy process in background!

cd benchmark

#measure all with system malloc
cargo bench

#measure only chat run
cargo bench -- "chat run"

#measure all with jemalloc
cargo bench --features jemalloc

#measure only simple run with jemalloc
cargo bench --features jemalloc -- "simple run"

Now HTML report is available at benchmark/target/criterion/report

Read more here: https://bheisler.github.io/criterion.rs/book/criterion_rs.html

Integrations

License

Licensed under either of

References

Contribute

Welcome to contribute !

Comments
  • Discussion: Should we add logging?

    Discussion: Should we add logging?

    I sometimes have the desire to set RUST_LOG=trace and see what's going on under the hood. Do you think we should add some tracing to this library as well? I have setup the actix_web middleware for logging but that does not help all too much wenn using graphql because almost all lines look like this: 127.0.0.1:43558 "POST / HTTP/1.1" 200 603432 "http://localhost:5001/" 0.221888.

    opened by nicolaiunrein 61
  • Interface enhancements

    Interface enhancements

    Why are GraphQL interfaces represented by rust enums and not traits ?

    This doesn't seems very idiomatic:

    use ::uuid::Uuid;
    
    #[Interface(
        field(name = "id", type = "&Uuid")
        )]
    pub enum Node {
        User(User)
    }
    
    pub struct User {
        pub id: Uuid,
    }
    
    #[::async_graphql::Object]
    impl User {
        pub async fn id(&self) -> &Uuid {
            &self.id
        }
    }
    

    Something like this would be easier to understand:

    use ::uuid::Uuid;
    
    #[::async_graphql::Interface]
    #[::async_trait::async_trait]
    pub trait Node {
        async fn id(&self) -> &Uuid;
    }
    
    pub struct User {
        pub id: Uuid,
    }
    
    #[::async_graphql::Object]
    #[::async_trait::async_trait]
    impl Node for User {
        async fn id(&self) -> &Uuid {
            &self.id
        }
    }
    

    Note that the async_trait crate is needed as async trait functions are not currently supported.

    opened by malobre 59
  • Context improvements

    Context improvements

    I've been working with ctx.data() and sometimes data doesn't exist (e.g. there might not be a User), but if I don't explicitly make it an Option<User>, the data() function panics.

    I think we should always return an Option from the method so it doesn't panic. This would make it the same as Tide's ext() method: https://docs.rs/tide/0.11.0/tide/struct.Request.html#method.ext

    If the consumer knows the data will exist, they can use .unwrap() on the Option.

    opened by phated 56
  • MergedMutation

    MergedMutation

    Description of the feature

    I'd like to be able to merge mutations (and merge objects with mutations), this would allow me to perform nested mutations.

    Code example

    struct With(Uuid);
    struct User(Uuid, String);
    
    #[Object]
    impl User {
      fn id(&self) -> ID {
        self.0.into()
      }
    
      fn name(&self) -> &str {
        &self.1
      }
    }
    
    #[Mutation]
    impl With {
      fn update(&self) -> Mutation {
        let updated_user = update_user();
        Mutation(self.clone(), updated_user)
      }
    }
    
    #[MergedMutation]
    struct Mutation(With, User);
    
    enhancement 
    opened by meh 45
  • Examples for inputValueType.

    Examples for inputValueType.

    I need to build a query endpoint that would support something like this:

    pub struct Criteria {
        pub value: HashMap<String, Vec<Criterion>>,
    }
    impl QueryRoot {
    async fn records(&self, criteria: Criteria, start: i64, skip: i64, order: SortCriteria) 
    }
    

    I'm trying to figure out a way to do this without manually implementing InputValueType. I'm sure it's possible, but I couldn't find a relevant example.

    opened by ruseinov 44
  • Relay @defer requires a label in the second chunk

    Relay @defer requires a label in the second chunk

    Trying to use defer with relay and get the following error:

    Invariant Violation: RelayModernQueryExecutor: invalid incremental payload, expected `path` and `label` to either both be null/undefined, or `path` to be an `Array<string | number>` and `label` to be a `string`
    

    Found here: https://github.com/facebook/relay/blob/2859aa8df4df7d4d6d9eef4c9dc1134286773710/packages/relay-runtime/store/RelayModernQueryExecutor.js#L1267

    Screen Shot 2020-06-04 at 5 44 56 pm

    This is what my chunk look like:

    
    ---
    Content-Type: application/json
    Content-Length: 1113
    
    {"data":{"room":{"title":"28 Elizabeth Street, Malvern","host":{"contactIq":null}}}}
    ---
    Content-Type: application/json
    Content-Length: 61
    
    {"path":["room","host","contactIq"],"data":{"fullName":null}}
    -----
    

    Looking at what facebook.com does with their @defer they definitely have label in their response payload

    {"data":{"node":{"__typename":"User","id":"726995694","timeline_list_feed_units":{"edges":[{"node": 
    .....
    {"label":"ProfileCometTimelineFeed_user$stream$ProfileCometTimelineFeed_user_timeline_list_feed_units","path":["node","timeline_list_feed_units","edges",1],"data":{"node":
    
    enhancement 
    opened by sync 43
  • New data source

    New data source

    I rewrote the code of DatsSource. The DataSource implemented for Stream has been temporarily removed, and this modification will be added after everyone agrees.

    opened by sunli829 38
  • Tracing extension doesn't work properly when used with async code

    Tracing extension doesn't work properly when used with async code

    Expected Behavior

    Should build correct spans tree image

    Actual Behavior

    Inconsistent span trees, some spans are missing parent. Don't think span.with_subscriber(|(id, d)| d.enter(id)) works in multi threaded runtime

    image

    Steps to Reproduce the Problem

    1. Clone this repo https://github.com/ibralu/async-graphql-tracing. I've used starwars example with sleep on resolvers
    2. Start jaeger
    docker run -d --name jaeger \
      -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
      -p 5775:5775/udp \
      -p 6831:6831/udp \
      -p 6832:6832/udp \
      -p 5778:5778 \
      -p 16686:16686 \
      -p 14268:14268 \
      -p 14250:14250 \
      -p 9411:9411 \
      jaegertracing/all-in-one:1.22
    
    1. Test with query
    {
      hero(episode: EMPIRE) {
        id
        name
        friends {
          id
          name
        }
        appearsIn
      }
    }
    
    
    

    Specifications

    • Version: 2.6
    • Platform: macOS
    • Subsystem: 11.2
    bug 
    opened by ibralu 37
  • Discussion: Improve performance

    Discussion: Improve performance

    So, basically, async-graphql is already a great library, but it's performance isn't so great yet. I think some performance focus it's pretty good fit for rust GraphQL library :)

    We had a discussion about it with @sunli829 via email and highlight some possible weak points.

    The performance problems of async-graphql are mainly due to the following reasons:

    1. Parser too much memory allocation, such as String. In fact, I have optimized it with unsafe code, and the performance has been improved. Parsing a very complex query 40,000 times has improved by 100 milliseconds. I think that it is not worthwhile to exchange some unsafe factors for such a little performance improvement. So I changed it back.

    2. The performance loss caused by the Box future returned by the async-trait. (This may not be easy to solve) I found a new library async-trait-ext, maybe it can avoid extra memory allocation, but I haven't tried it yet.

    3. Performance loss caused by asynchronous resolver function. (I have n’t thought of a method that is compatible with both synchronous and asynchronous, because it may mean that a lot of infrastructure needs to provide both synchronous and asynchronous)

    Some solutions:

    According to my tests, replacing https://github.com/async-graphql/benchmark with jemalloc can bring great performance improvements.

    Query parsing/validation caching can be really great feature, especially because it's almost required for https://www.apollographql.com/docs/apollo-server/performance/apq/ Our app clients have in total less than 1000 queries/mutations/subscriptions, and all of it purely static, only variables is changed. So, basically, caching all of this queries documents can get rid of parsing/validation phase entirely in whole server and it's not really hard to implement - fast string hashing, simple LRU cache and additional setting to enable/disable this feature. There is can be additional option - cache only persisted queries, when they will be implemented.

    But, of course,

    We need a more complete benchmark test, we should first complete this work, and then first to improve the part with the greatest impact on performance.

    We already have some benchmarks at https://github.com/async-graphql/benchmark but it should be improved.

    Maybe it's worth to move benchmark to main repo and add https://github.com/marketplace/actions/continuous-benchmark to have clear baseline and performance history.

    enhancement 
    opened by Amareis 37
  • Dynamic schema

    Dynamic schema

    Async-graphql lacks an important feature that most graphql implementations do not. Support both static and dynamic schema, and only with dynamic schema can write something like hasaru.

    I have some preliminary ideas about the implementation of this feature. Do you think this feature is important?

    @nicolaiunrein @phated

    enhancement 
    opened by sunli829 36
  • Adding GQL prefix on important components

    Adding GQL prefix on important components

    This what I have so far I can't find the button to mark the PR as Draft, is that something that should be enabled at project level ?

    what's missing:

    • [x] GqlError
    • [x] GqlInputValueResult
    • [x] GqlQueryBuilder
    • [x] GqlResult
    • [x] GqlValue
    • [x] GqlID
    opened by IcanDivideBy0 33
  • Query errors when parsing `Float` argument variables

    Query errors when parsing `Float` argument variables

    Expected Behavior

    When creating a field with a Float type argument and passing the value for the argument as a query variable, the request should succeed in parsing the query argument as a Float. I am executing the query with Content-Type: application/json to ensure that the variables are not send as query params since this often leads to string serialization of floats.

    Actual Behavior

    When passing a Float argument, the server returns an error indicating that the query can not be executed because the variable is not a Float:

    {
      "data": null,
      "errors": [
        {
          "message": "Invalid value for argument \"location.latitude\", expected type \"Float\"",
          "locations": [
            {
              "line": 2,
              "column": 24
            }
          ]
        }
      ]
    }
    

    Steps to Reproduce the Problem

    1. Create a schema containing a query accepting an InputObject type, which contains a Float field using dynamic schema.
    2. Create a query passing the argument as a variable (passing the argument inline of the query works as expected):
    Example Query
    query SearchNearbyQuery($location:ScoreLocationInput!) {
      allNearby(location:$location) {
        edges {
          node {
            score
          }
        }
      }
    }
    
    Example Variables
    {"location":{"latitude":39.8617,"longitude":-104.6732}}
    
    1. To confirm that the query args are being sent over JSON, and that the issue is with variable parsing also test via curl with positive and negative cases:
    Positive Case (serializing args into the query works as expected)
    curl 'http://localhost:8080/' -H 'Accept-Encoding: gzip, deflate, br' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Connection: keep-alive' \
      -H 'DNT: 1' \
      -H 'Origin: http://localhost:8080' \
      --data-binary '{"query":"query SearchNearbyQuery { allNearby(location:{latitude:39.8617,longitude:-104.6732}) { edges { node { score } } }"}'
    
    
    Negative Case (serializing args as query variables fails with error above)
    curl 'http://localhost:8080/' -H 'Accept-Encoding: gzip, deflate, br' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Connection: keep-alive' \
      -H 'DNT: 1' \
      -H 'Origin: http://localhost:8080' \
      --data-binary '{"query":"query SearchNearbyQuery { allNearby(location:{latitude:39.8617,longitude:-104.6732}) { edges { node { score } } }","variables":{"location":{"latitude":39.8617,"longitude":-104.6732}}}'
    
    

    Specifications

    • Version: 5.0.1 and master
    • Platform: macos and linux
    • Web Server Integration: tested with both poem and axum, producing the same behavior
    bug 
    opened by spiegela 1
  • References to objects in documentation code should refer to the correct GraphQL field

    References to objects in documentation code should refer to the correct GraphQL field

    Description of the feature

    References to documentation code using [crate::.....] syntax should refer to the correct GraphQL field

    Code example (if possible)

    In the following example, the enum value PRIVATE is referring to a struct that derives SimpleObject. It'd be awesome if these references would translate to the equally named GraphQL field within my QueryRoot.

    use async_graphql::Enum;
    
    #[derive(PartialEq, Eq, Copy, Clone, Enum)]
    pub enum ScenarioRunnerKind {
        /// A shared runner which is meant for multiple users. A restriction is that virtual
        /// machines can not be started if the runner is shared.
        SHARED,
    
        /// A private runner which is meant for one particular [crate::graphql::user::CognitoUser]
        PRIVATE,
    }
    
    
    enhancement 
    opened by rbozan 0
  • A way to drastically reduce code in this situation

    A way to drastically reduce code in this situation

    I'm using async-graphql with no problem at all, thanks for your work!

    I have a feature request (or, if it is already possible, just a request for clarification).

    I have the graphql mod which has this code:

    #[derive(InputObject)]
    pub struct PlayerFilters {
        pub id: Option<String>,
        pub created_at: Option<time::OffsetDateTime>,
        pub name: Option<String>,
        pub name_night: Option<String>,
        pub team: Option<String>,
        pub team_night: Option<String>,
        // ... and many many others ...
    }
    
    impl From<PlayerFilters> for app::PlayerFilters {
        fn from(o: PlayerFilters) -> Self {
            Self {
                id: o.id,
                created_at: o.created_at.map(Into::into),
                name: o.name,
                name_night: o.name_night,
                team: o.team,
                team_night: o.team_night,
                // ... and many many others ...
            }
        }
    }
    

    and the app mod which has:

    pub struct PlayerFilters {
        pub id: Option<String>,
        pub created_at: Option<time::OffsetDateTime>,
        pub name: Option<String>,
        pub name_night: Option<String>,
        pub team: Option<String>,
        pub team_night: Option<String>,
        // ... and many many others ...
    }
    

    as you can see they have exactly the same fields: I did this because I cannot edit the code in app mod.

    But since they have the exact same fields, is there a way to tell async-graphql to use app's struct as the InputObject rather than repeating all the code twice?

    Something like:

    #[derive(InputObject)]
    pub struct PlayerFilters(pub app::PlayerFilters)
    

    or

    #[derive(InputObject)]
    #[graphql(from="app::PlayerFilters")]
    pub struct PlayerFilters{}
    

    Thank you again for this amazing project!

    enhancement 
    opened by frederikhors 4
  • InputObject field visibility: misbehavior

    InputObject field visibility: misbehavior

    Expected Behavior

    User do not be able to send a request for the object defined bellow with a doc_price field, when has_admin_role return false

    #[derive(Default, InputObject, Debug)]
    #[graphql(input_name = "contract")]
    pub struct ContractInput {
        doc_type: Option<String>,
        doc_conditions: Option<String>,
        doc_number: Option<String>,
        #[graphql(visible = "has_admin_role")]
        doc_price: Option<Decimal>,
    }
    

    Actual Behavior

    Request sent successfully

    Steps to Reproduce the Problem

    1. Code
    #[derive(Default, InputObject, Debug)]
    #[graphql(input_name = "contract")]
    pub struct ContractInput {
        doc_type: Option<String>,
        doc_conditions: Option<String>,
        doc_number: Option<String>,
        #[graphql(visible = "has_admin_role")]
        doc_price: Option<Decimal>,
    }
    
    pub fn has_admin_role(ctx: &Context<'_>) -> bool {
       false
    }
    
    #[derive(Default)]
    pub struct ContractMutation;
    
    #[Object]
    impl ContractMutation {
        async fn insert(&self, ctx: &Context<'_>, contract: ContractInput) -> async_graphql::Result<bool> {
            println!("Contract price: {}", contract.doc_price)
            Ok(true)
        }
    }
    
    1. Sending request with payload:
    mutation {
      insert(contract:{
        docType: "contract",
        docConditions:"Unknown",
        docNumber:"00005",
        docPrice: 101.02
      })
    }
    
    1. In console "Contract price 101.02" will be printed

    Specifications

    • Version: async-graphql = { version = "5.0.4", features = ["decimal", "opentelemetry", "chrono", "dataloader"] }
    • Platform: MacOS
    bug 
    opened by anatse 1
  • Oneof directive not included in introspection result

    Oneof directive not included in introspection result

    Expected Behavior

    I would expect the @oneof directive to be included in the result of an introspection query whenever the #[derive(OneofObject)] macro is used on a struct.

    Actual Behavior

    The directive is not listed in the introspection query result:

    image

    Steps to Reproduce the Problem

    1. Clone this minimal example: https://github.com/bvanneerven/introspection-example
    2. Run with cargo run
    3. Go to http://localhost:8001 and open the network tab in the browser developer tools
    4. Trigger an introspection query by clicking the 'Re-fetch GraphQL schema' button
    5. Verify that the @oneof directive is not listed in the response from the server

    Specifications

    • Version: { git = "https://github.com/async-graphql/async-graphql" }
    • Platform: WSL (Ubuntu-20.04)
    bug 
    opened by bvanneerven 2
Releases(v5.0.0)
  • v5.0.0(Nov 28, 2022)

    • Add support for dynamic schema
    • Add support to federation(v2) for dynamic schema
    • Add tempfile feature, enabled by default
    • Keep object 'implements' order stable in SDL export #1142
    • Fix regression on ComplexObject descriptions #1141
    • Fixes #1138
    • Fixes #1140
    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(May 17, 2022)

    • Implement the ConnectionNameType and EdgeNameType traits to specify GraphQL type names for Connection and Edge, which can be automatically generated using DefaultConnectionName and DefaultEdgeName.
    • Add #[non_exhaustive] attribute to Request/Response types.
    • Introduce ability to pre-parse Request's query. #891
    • Add introspection-only mode. #894
    • Add bson-uuid feature to implement ScalarType for bson::Uuid. #875
    • Bump regex crate from 1.4.5 to 1.5.5. #862
    • Bump chrono-tz crate from 0.5.3 to 0.6.1. #831
    • Move the pest parser code generation step into a test. #901
    • Update log to version 0.4.16. #903
    • Added impl of CursorType for floats #897
    • Implement OutputType for tokio::sync::RwLock and tokio::sync::Mutex. #896
    • Bump uuid to 1.0.0. #907
    • Add some options for exporting SDL. #877
    • Cache parsed ExecuteDocument in APQ. #919
    • Fixed OneofObject restriction on inner types being unique. #923
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Nov 19, 2021)

    Changes in v3.0:

    Use the SimpleObject macro and the InputObject macro at the same time.

    #[derive(SimpleObject, InputObject)]
    #[graphql(input_name = "MyObjectInput")]
    struct MyObject {
        #[graphql(default = 10)]
        a: i32,
        b: bool,
    }
    

    Types that are not referenced will be hidden in introspection.

    #[derive(SimpleObject)]
    struct MyObj {
        a: i32,
    }
    
    #[Object]
    struct Query {
        #[graphql(visible = false)]
        fn obj(&self) -> MyObj {
            todo!()
        }
    }
    
    let schema = Schema::new(Query, EmptyMutation, EmptySubscription);
    assert_eq!(
        schema.execute(r#"{ __type(name: "MyObj") { name } }"#).await.into_result().unwrap().data,
        value!({ "__type": null })
    );
    

    Make the API of integrations is more consistent.

    Remove async-graphql-tide.

    Rework validators.

    Built-in validator:

    struct Query;
    
    #[Object]
    impl Query {
        async fn value1(&self, #[graphql(validator(maximum = 10))] n: i32) -> i32 {
            n
        }
    }
    

    Custom-validator:

    struct MyValidator {
        expect: i32,
    }
    
    impl MyValidator {
        pub fn new(n: i32) -> Self {
            MyValidator { expect: n }
        }
    }
    
    impl CustomValidator<i32> for MyValidator {
        fn check(&self, value: &i32) -> Result<(), String> {
            if *value == self.expect {
                Ok(())
            } else {
                Err(format!("expect 100, actual {}", value))
            }
        }
    }
    
    struct Query;
    
    #[Object]
    impl Query {
        async fn value(
            &self,
            #[graphql(validator(custom = "MyValidator::new(100)"))] n: i32,
        ) -> i32 {
            n
        }
    }
    

    Rework guards.

    #[derive(Eq, PartialEq, Copy, Clone)]
    enum Role {
        Admin,
        Guest,
    }
    
    pub struct RoleGuard {
        role: Role,
    }
    
    impl RoleGuard {
        fn new(role: Role) -> Self {
            Self { role }
        }
    }
    
    #[async_trait::async_trait]
    impl Guard for RoleGuard {
        async fn check(&self, ctx: &Context<'_>) -> Result<()> {
            if ctx.data_opt::<Role>() == Some(&self.role) {
                Ok(())
            } else {
                Err("Forbidden".into())
            }
        }
    }
    
     #[derive(SimpleObject)]
    struct Query {
        #[graphql(guard = "RoleGuard::new(Role::Admin)")]
        value: i32,
    }
    

    Use parameters:

    struct EqGuard {
        expect: i32,
        actual: i32,
    }
    
    impl EqGuard {
        fn new(expect: i32, actual: i32) -> Self {
            Self { expect, actual }
        }
    }
    
    #[async_trait::async_trait]
    impl Guard for EqGuard {
        async fn check(&self, _ctx: &Context<'_>) -> Result<()> {
            if self.expect != self.actual {
                Err("Forbidden".into())
            } else {
                Ok(())
            }
        }
    }
    
    struct Query;
    
    #[Object]
    impl Query {
        #[graphql(guard = "EqGuard::new(100, value)")]
        async fn get(&self, value: i32) -> i32 {
            value
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
Pyre - A fast python HTTP server inspired by japronto written in rust.

Pyre - A fast python HTTP server inspired by japronto written in rust.

null 135 Nov 26, 2022
Fast and friendly HTTP server framework for async Rust

Tide Serve the web API Docs | Contributing | Chat Tide is a minimal and pragmatic Rust web application framework built for rapid development. It comes

http-rs 4.1k Jan 2, 2023
An HTTP library for Rust

hyper A fast and correct HTTP implementation for Rust. HTTP/1 and HTTP/2 Asynchronous design Leading in performance Tested and correct Extensive produ

null 11k Jan 8, 2023
Rust bindings to libcurl

curl-rust libcurl bindings for Rust Quick Start use std::io::{stdout, Write}; use curl::easy::Easy; // Print a web page onto stdout fn main() {

Alex Crichton 882 Dec 31, 2022
An easy and powerful Rust HTTP Client

reqwest An ergonomic, batteries-included HTTP Client for Rust. Plain bodies, JSON, urlencoded, multipart Customizable redirect policy HTTP Proxies HTT

Sean McArthur 6.8k Dec 31, 2022
FeignHttp is a declarative HTTP client. Based on rust macros.

FeignHttp is a declarative HTTP client. Based on rust macros. Features Easy to use Asynchronous request Configurable timeout settings Suppor

null 46 Nov 30, 2022
Pretend is a macros-based declarative Rust HTTP client

pretend is a modular, Feign-inspired HTTP, client based on macros. It's goal is to decouple the definition of a REST API from it's implementation.

null 24 Aug 3, 2022
A rule34 scraper made in rust this time

rust-34-scraper A rule34 scraper made in rust this time Building Clone the repository Execute cargo build --release --release is an optimized build pr

null 3 Jun 10, 2022
Minimal Rust HTTP client for both native and WASM

ehttp: a minimal Rust HTTP client for both native and WASM If you want to do HTTP requests and are targetting both native and web (WASM), then this is

Emil Ernerfeldt 105 Dec 25, 2022
ratpack: a simpleton's HTTP framework (for rust-lang)

ratpack: a simpleton's HTTP framework (for rust-lang) ratpack is idealized in the simplicity of the sinatra (ruby) framework in its goal, and attempts

ZeroTier, Inc. 5 Jun 29, 2022
A backend providing a HTTP REST like interface for uploading files written in rust.

UploadServer A backend providing a HTTP REST like interface for uploading files written in rust. API Documentation License This project is licensed un

null 4 Nov 20, 2022
GraphQL server library for Rust

GraphQL server library for Rust GraphQL is a data query language developed by Facebook intended to serve mobile and web application frontends. Juniper

GraphQL Rust 4.9k Jan 5, 2023
A Rust Boilerplate server with GraphQL API, Diesel, PostgreSQL, session authentication and JWT

Canduma rust Graphql A Rust authentication server with GraphQL API, Diesel, PostgreSQL session authentication and JWT This repository contains a Graph

Julien Lenne 738 Dec 28, 2022
Rust GraphQL server using simple type-only schema

SimpleGQL This library allows a simplified GraphQL schema to be given and will run a server with a backend store (currently only SQLite) and a set of

Daniel Cocks 5 May 10, 2023
Rust server with Axum, GraphQL and SurrealDb

??️ Article on my web Axum server, Async-GraphQl, SurrealDB template Run without any prior setup, DB is in memory: cargo run To use routes other than

null 15 Jun 26, 2023
SubZero - a standalone web server that turns your database directly into a REST/GraphQL api

What is this? This is a demo repository for the new subzero codebase implemented in Rust. subZero is a standalone web server that turns your database

subZero 82 Jan 1, 2023
General purpose client/server networking library written in Rust, built on top of the QUIC protocol which is implemented by quinn

Overview "This library stinks!" ... "Unless you like durian" durian is a client-server networking library built on top of the QUIC protocol which is i

Michael 92 Dec 31, 2022
Rust / Hasura / GraphQL

Rust + Hasura This is an example of a Rust server that functions as a remote schema for Hasura. It demonstrates: user login + signup JWT authorization

Rónán 130 Dec 26, 2022
Typed, correct GraphQL requests and responses in Rust

graphql_client A typed GraphQL client library for Rust. Features Precise types for query variables and responses. Supports GraphQL fragments, objects,

GraphQL Rust 914 Dec 27, 2022
Diana is a GraphQL system for Rust that's designed to work as simply as possible out of the box

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.

null 0 Aug 3, 2021