Skip to content

Commit

Permalink
move to .gqlgen.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vvakame committed Jul 6, 2018
1 parent f79b6a5 commit 4294815
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 32 deletions.
3 changes: 3 additions & 0 deletions example/chat/.gqlgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
models:
Chatroom:
model: github.com/vektah/gqlgen/example/chat.Chatroom
2 changes: 1 addition & 1 deletion example/chat/resolvers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate gorunpkg github.com/vektah/gqlgen -typemap types.json -out generated.go
//go:generate gorunpkg github.com/vektah/gqlgen

package chat

Expand Down
3 changes: 0 additions & 3 deletions example/chat/types.json

This file was deleted.

5 changes: 5 additions & 0 deletions example/dataloader/.gqlgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
models:
Order:
model: github.com/vektah/gqlgen/example/dataloader.Order
Customer:
model: github.com/vektah/gqlgen/example/dataloader.Customer
2 changes: 1 addition & 1 deletion example/dataloader/resolvers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate gorunpkg github.com/vektah/gqlgen -out generated.go -typemap types.json
//go:generate gorunpkg github.com/vektah/gqlgen

package dataloader

Expand Down
4 changes: 0 additions & 4 deletions example/dataloader/types.json

This file was deleted.

13 changes: 13 additions & 0 deletions example/scalars/.gqlgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
models:
User:
model: github.com/vektah/gqlgen/example/scalars.User
Timestamp:
model: github.com/vektah/gqlgen/example/scalars.Timestamp
SearchArgs:
model: github.com/vektah/gqlgen/example/scalars.SearchArgs
Point:
model: github.com/vektah/gqlgen/example/scalars.Point
ID:
model: github.com/vektah/gqlgen/example/scalars.ID
Tier:
model: github.com/vektah/gqlgen/example/scalars.Tier
2 changes: 1 addition & 1 deletion example/scalars/resolvers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate gorunpkg github.com/vektah/gqlgen -typemap types.json -out generated.go
//go:generate gorunpkg github.com/vektah/gqlgen

package scalars

Expand Down
8 changes: 0 additions & 8 deletions example/scalars/types.json

This file was deleted.

2 changes: 1 addition & 1 deletion example/selection/selection.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate gorunpkg github.com/vektah/gqlgen -out generated.go
//go:generate gorunpkg github.com/vektah/gqlgen

package selection

Expand Down
15 changes: 15 additions & 0 deletions example/starwars/.gqlgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
models:
Droid:
model: github.com/vektah/gqlgen/example/starwars.Droid
FriendsConnection:
model: github.com/vektah/gqlgen/example/starwars.FriendsConnection
FriendsEdge:
model: github.com/vektah/gqlgen/example/starwars.FriendsEdge
Human:
model: github.com/vektah/gqlgen/example/starwars.Human
Review:
model: github.com/vektah/gqlgen/example/starwars.Review
ReviewInput:
model: github.com/vektah/gqlgen/example/starwars.Review
Starship:
model: github.com/vektah/gqlgen/example/starwars.Starship
2 changes: 1 addition & 1 deletion example/starwars/resolvers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate gorunpkg github.com/vektah/gqlgen -typemap types.json -out generated.go
//go:generate gorunpkg github.com/vektah/gqlgen

package starwars

Expand Down
9 changes: 0 additions & 9 deletions example/starwars/types.json

This file was deleted.

9 changes: 7 additions & 2 deletions test/.gqlgen.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
schema: schema.graphql
output: generated.go
modeloutput: models/generated.go

exec:
filename: generated.go
# package:
model:
filename: models/generated.go
# package:

models:
Element:
Expand Down
2 changes: 1 addition & 1 deletion test/resolvers_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate gorunpkg github.com/vektah/gqlgen -models models/generated.go
//go:generate gorunpkg github.com/vektah/gqlgen

package test

Expand Down

0 comments on commit 4294815

Please sign in to comment.