Skip to content

An Experimental GraphQL Server using Golang & Mongo Db

Notifications You must be signed in to change notification settings

purwokertodev/go-mongo-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang, GraphQL & Mongo Demo

Ingredients

Install Dependencies

$ glide install

Running

$ MONGO_HOST=localhost MONGO_DB_NAME=tutorial1 go run main.go

graphql

  • Create Profile
$ curl -g 'http://localhost:8080/graphql?query=mutation+_{createProfile(id:"U5",firstName:"Andre",lastName:"De",email:"andre@yahoo.com",password:"123456"){id,firstName,lastName,email,password,createdAt,updatedAt}}'
  • Get Profile
$ curl -g 'http://localhost:8080/graphql?query={profile(id:"U3"){id,firstName,email}}'
  • Get Profiles
$ curl -g 'http://localhost:8080/graphql?query={profiles{id,firstName,email,password,updatedAt}}'

2018 Purwokerto Dev