Skip to content

Commit 4dc1455

Browse files
committed
Add Async-graphql rust crate
1 parent 24f7de4 commit 4dc1455

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/content/code/code.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,26 @@ sleep
562562

563563
### Rust
564564

565-
- [graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust
565+
[Async-graphql](https://github.com/async-graphql/async-graphql)
566+
567+
Async-graphql is a high-performance server-side library that supports all GraphQL specifications.
568+
569+
```rust
570+
use async_graphql::*;
571+
572+
struct Query;
573+
574+
#[Object]
575+
impl Query {
576+
/// Returns the sum of a and b
577+
async fn add(&self, a: i32, b: i32) -> i32 {
578+
a + b
579+
}
580+
}
581+
```
582+
583+
584+
[graphql-rust/juniper](https://github.com/graphql-rust/juniper): GraphQL server library for Rust
566585

567586
### Scala
568587

0 commit comments

Comments
 (0)