Skip to content

charlesbthomas/rusty-todos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rusty Todos 🦀

A fun little experiment to help me brush up on my Rust.

This is a simple little GraphQL ToDo Api built with:

diagram

Schema:

type CompleteResult {
        username: String!
        task: String!
}

type Mutation {
        addTodo(username: String!, task: String!): Todo!
        markTodoComplete(username: String!, task: String!): CompleteResult!
}

type Query {
        user(username: String!): User!
        users: [User!]!
}

type Todo {
        task: String!
        completed: Boolean!
}

type User {
        username: String!
        todos: [Todo!]!
}

schema {
        query: Query
        mutation: Mutation
}

To Deploy to a test AWS Account 📦

  1. Make sure you have an aws profile configured via: aws configure (You will need access creds configured on your profile).
  2. In the root of this repo: sam build
  3. sam deploy (Follow the prompts)
  4. Query Away

If I have Time:

  • Refactor the graphql error handling to not be a hack... 🙈
  • Learn the best way to unit test this kind of code 🧪
  • Learn about better dependency injection practices with Rust 🏗️

About

A serverless graphql demo written in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages