Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use the official gqlgen instead #3

Merged
merged 1 commit into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ GIT_COMMIT=$(shell git rev-parse HEAD)
GIT_COMMIT_DATE=$(shell git log -n1 --pretty='format:%cd' --date=format:'%Y-%m-%d_%H:%M:%S')

tools:
@rm -rf ${GOPATH}/src/github.com/j75689/gqlgen
@git clone https://github.com/j75689/gqlgen.git ${GOPATH}/src/github.com/j75689/gqlgen
@cd ${GOPATH}/src/github.com/j75689/gqlgen && git checkout feat/custom-struct-tag && go install
@go get github.com/google/wire/cmd/wire
@go install github.com/golang/mock/mockgen@v1.6.0

gen:
# generate model & reslover
@gqlgen
@go run tool/gqlgen/main.go
# generate dependency injection
@wire ./service/...

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
cloud.google.com/go/pubsub v1.15.0
github.com/99designs/gqlgen v0.11.3
github.com/99designs/gqlgen v0.17.2
github.com/HdrHistogram/hdrhistogram-go v1.0.1 // indirect
github.com/adjust/rmq/v4 v4.0.0
github.com/alicebob/miniredis/v2 v2.15.1
Expand Down Expand Up @@ -32,7 +32,7 @@ require (
github.com/thoas/go-funk v0.7.0
github.com/uber/jaeger-client-go v2.25.0+incompatible
github.com/uber/jaeger-lib v2.4.0+incompatible
github.com/vektah/gqlparser/v2 v2.0.1
github.com/vektah/gqlparser/v2 v2.4.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/api v0.54.0
google.golang.org/grpc v1.39.1
Expand Down
2 changes: 1 addition & 1 deletion gqlgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ models:
- github.com/99designs/gqlgen/graphql.Int64
- github.com/99designs/gqlgen/graphql.Int32
Timestamp:
model: github.com/99designs/gqlgen/example/scalars/model.Timestamp
model: github.com/j75689/Tmaster/pkg/graph/scalar.Timestamp
Map:
model: github.com/j75689/Tmaster/pkg/graph/scalar.Map
Loading