Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/purwokertodev/go-mongo-graphql
An Experimental GraphQL Server using Golang & Mongo Db
https://github.com/purwokertodev/go-mongo-graphql
go golang golang-application golang-examples golang-server graphql graphql-go graphql-server
Last synced: about 2 months ago
JSON representation
An Experimental GraphQL Server using Golang & Mongo Db
- Host: GitHub
- URL: https://github.com/purwokertodev/go-mongo-graphql
- Owner: purwokertodev
- Created: 2018-05-10T18:10:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T19:22:31.000Z (over 6 years ago)
- Last Synced: 2024-11-15T14:18:42.856Z (about 2 months ago)
- Topics: go, golang, golang-application, golang-examples, golang-server, graphql, graphql-go, graphql-server
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Golang, GraphQL & Mongo Demo
## Ingredients
- Golang version 1.7+ https://golang.org/- Glide https://github.com/Masterminds/glide
- MongoDb https://www.mongodb.com/
## Install Dependencies
```shell
$ glide install
```## Running
```shell
$ MONGO_HOST=localhost MONGO_DB_NAME=tutorial1 go run main.go
```## graphql
- Create Profile
```shell
$ curl -g 'http://localhost:8080/graphql?query=mutation+_{createProfile(id:"U5",firstName:"Andre",lastName:"De",email:"[email protected]",password:"123456"){id,firstName,lastName,email,password,createdAt,updatedAt}}'
```- Get Profile
```shell
$ curl -g 'http://localhost:8080/graphql?query={profile(id:"U3"){id,firstName,email}}'
```- Get Profiles
```shell
$ curl -g 'http://localhost:8080/graphql?query={profiles{id,firstName,email,password,updatedAt}}'
```###
2018 Purwokerto Dev