🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/omaressameldin/grpc-graphql-demo

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/omaressameldin/grpc-graphql-demo

v0.0.0-20190326134224-c1de75c71221
Source
Go
Version published
Created
Source

Readme

What this is

  • A Todo app using GO, GRPC and GraphQL
  • the todo app has a GO / GRPC service for creating, updating, deleting, and reading tasks and a GO / GraphqL api layer in front of the service
  • it's using BoltDB for saving tasks

How to use

  • make sure you have docker version: 18.x+ installed
  • run docker-compose -f docker-compose.dep.yml up --build
  • run docker-compose up --build to launch all services
  • open localhost:9181 to go to graphql playground

Sample Requests

Queries:

query findTodos {
  todos(input: {justRemaining: true}) {
    id
    description
    title
    isDone
    reminder
  }
}
query findTodo {
  todo(input: {todoId: "11"}) {
    title
    description
    reminder
  }
}

Mutations:

mutation createTodo {
  createTodo(input:{description: "the thirty-first todo", title:"todo 31", reminder: "2019-03-07 16:15:00"}) {
    id
    title
    description
    reminder
  }
}
mutation updateTodo {
  updateTodo(input: {
  	todoId:"26",
  	title:"todo 26"
  	description: "the twenty-sixth todo"
   	reminder:"2019-03-07 16:15:00"
    isDone: true

  }){
    id
    title
    description
    reminder
  }
}
mutation deleteTodo {
  deleteTodo(input: {todoId: "10"})
}
# delete will only work if you add a token header, e.g:
#  {
#    "Token": "123"
#  }

Subscriptions:

subscription remainingTodos {
  remainingTodos
}

Technologies used

  • Golang
  • GRPC
  • graphQL
  • Docker
  • Docker-compose
  • BoltDB

FAQs

Package last updated on 26 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts