Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 1021 Bytes

README.md

File metadata and controls

32 lines (30 loc) · 1021 Bytes

RustGQL

a tool for graqhql , written in rust for better performance. pass all test case in graphql-rust (link)

Quick Start

install rustql_parser and rustql_common.

  • rustgql_parser: lexer and parser for graphql.
  • rustgql_common: ast and token for graphql.
  • rustgql_typegen: generate typescript .d.ts file from your schema.
use rustgql_parser::parser::Parser;
fn main() {
    let code = "
        query {
            node {
            id
            ...something
            }
        }
    ";
    let mut parser = Parser::new(code);
    let doc = parser.parse();
    println!("{:?}", doc);
}

Benchesmark

using criterion for benchmark, compare to graphql-rust is 4 time faster.

file kitchen-sink_canonical
graphql-rust 28.016 us
rustgql 6.1192us
~ 4.5783x