Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 884 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 884 Bytes

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