Code Monkey home page Code Monkey logo

todo-app's Introduction

Spring Boot GraphQL and React JS Todo-Application

  • Spring Boot

  • Exception Handling

  • GraphQL

  • Validation

  • H2 Database

  • React JS

  • Apollo Client

Postman Collection

Live Demo

example

example

example

example

example

Usage/Examples

Api Endpoint

/api/graphql

Get All Todos

Parameter Type Description
id ID Required. user id
completed Boolean true or false
  • get all todos - request
query {
  getAllTodos(id:1, completed:false ) {
        id task completed created priority
  }
}
  • get all todos - response
{
    "data": {
        "getAllTodos": [
            {
                "id": "3",
                "task": "go for a walk 30 min",
                "completed": false,
                "created": "2022-02-10 19:29:45.33",
                "priority": "HIGH"
            },
            {
                "id": "4",
                "task": "read book",
                "completed": false,
                "created": "2022-02-10 19:29:45.33",
                "priority": "HIGH"
            }
            ................
        ]
    }
}

Create Todo

Parameter Type Description
todo CreateTodo Required

create todo request


mutation {
  createTodo(todo : {task:"task" priority:"HIGH" user:{ id: 1} } ){
     id task completed created 
  }
}

create todo response

{
    "data": {
        "createTodo": {
            "id": "8",
            "task": "task",
            "completed": false,
            "created": "2022-02-10 20:18:14.452"
        }
    }
}

Update Todo

Parameter Type Description
todo UpdateTodo Required

update todo request

mutation {
  updateTodo(todo : {id: 8, task:"task" priority:"HIGH" completed:true } ){
     id task completed created 
  }
}

update todo response

{
    "data": {
        "updateTodo": {
            "id": "8",
            "task": "task",
            "completed": true,
            "created": "2022-02-10 20:18:14.452"
        }
    }
}

Delete Todo

Parameter Type Description
id ID Required

delete todo request

mutation {
  delete(id:8 ){
     id task completed created 
  }
}

delete todo response

{
    "data": {
        "delete": {
            "id": "8",
            "task": "task",
            "completed": true,
            "created": "2022-02-10 20:18:14.452"
        }
    }
}

Installation

  • Clone

  git clone https://github.com/gurkanucar/todo-app.git
  • run backend

  cd ./todo-be

  mvn spring-boot:run
  • run frontend

  cd ./todo-fe

  npm Install

  npm start

todo-app's People

Contributors

gurkanucar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.