https://github.com/holyshared/go-graphql-server
https://github.com/holyshared/go-graphql-server
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/holyshared/go-graphql-server
- Owner: holyshared
- License: mit
- Created: 2021-04-20T04:26:09.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-21T06:55:51.000Z (about 5 years ago)
- Last Synced: 2025-02-17T13:45:17.449Z (over 1 year ago)
- Language: Go
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-graphql-server
## Setup project
https://gqlgen.com/getting-started/
```shell
go mod init github.com/[username]/go-graphql-server
go get github.com/99designs/gqlgen
go run github.com/99designs/gqlgen init
```
## Start of GraphQL Server
```shell
go run server.go
```
## Add magic comment to resolver.go
```golang
//go:generate go run github.com/99designs/gqlgen
package graph
```
```shell
go generate ./...
```
### dataloader
```shell
go run github.com/vektah/dataloaden UserLoader string *go-graphql-server/graph/model.User
```