Skip to content

danbruder/async-graphql-sqlx-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust GraphQL API Example

Minimal example using async graphql, sqlx, warp, and sqlite.

The GraphQL api has CRUD actions on todos as well as subscriptions to changes.

Running

Clone the repo and run

cargo run

Open up http://localhost:8080 to see the GraphQL playground

Create a subscription in one window:

subscription {
  todos {
    id
    mutationType
    item
  }
}

Next, create a new todo in another window:

mutation {
  createTodo(body: "New todo!", complete: false) {
    id
    body
  }
}

About

Minimal example using async_graphql, sqlx, warp, and sqlite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published