NoScopeDevs / graphql-flutter-todo-app

A simple todo app that showcases graphql with flutter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL Flutter Todo App

A basic project showcasing a GraphQL API build with gqlgen for the backend and Flutter for the front end using package:graphql.

How to run?

To start the server:

cd go-graphql-server

go run server.go

To run the flutter app:

cd graphql_todo_app

flutter run lib/main.dart

Useful query/mutation for the gql playground

query getTodos{
  todos {
    id
    text
    isCompleted
  }
}

mutation saveTodo{
  saveTodo(input: {
    # id: "f4ccf8e0-82ba-4cac-b714-a5fd3950d322"
    text: "My Super Todo"
    isCompleted: true
  }) {
    id,
    text,
    isCompleted
  }
}

mutation saveTodoWithVariables($todoInput: TodoInput!) {
	saveTodo(input: $todoInput){
    id
    text
    isCompleted
  }
}

mutation deleteTodo{
  deleteTodo(id: "f4ccf8e0-82ba-4cac-b714-a5fd3950d322"){
    id
    text
	isCompleted
  }
}

About

A simple todo app that showcases graphql with flutter.


Languages

Language:C++ 38.7%Language:CMake 32.0%Language:Dart 16.9%Language:Go 4.6%Language:HTML 3.2%Language:C 2.4%Language:Swift 2.0%Language:Kotlin 0.2%Language:Objective-C 0.1%