Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solo-steven/rustgql
graphql tool written in rust
https://github.com/solo-steven/rustgql
babel babel-plugin graphql graphql-code-generator graphql-query-language graphql-schema-language minifier parser rust
Last synced: about 1 month ago
JSON representation
graphql tool written in rust
- Host: GitHub
- URL: https://github.com/solo-steven/rustgql
- Owner: Solo-steven
- License: mit
- Created: 2023-08-13T06:32:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-12T05:28:16.000Z (over 1 year ago)
- Last Synced: 2024-10-28T14:57:33.077Z (2 months ago)
- Topics: babel, babel-plugin, graphql, graphql-code-generator, graphql-query-language, graphql-schema-language, minifier, parser, rust
- Language: Rust
- Homepage:
- Size: 1.3 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RustGQL
a tool for graqhql , written in rust for better performance. pass all test case in graphql-rust ([link](https://github.com/graphql-rust/graphql-parser/tree/master/tests))## 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.
```rust
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 |