Skip to content

Commit

Permalink
Use Implements for type Implementors in codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathew Byrne committed Feb 7, 2019
1 parent ccca823 commit 99e9f41
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions codegen/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ type Objects []*Object

func (o *Object) Implementors() string {
satisfiedBy := strconv.Quote(o.Name)
for _, s := range o.Definition.Interfaces {
satisfiedBy += ", " + strconv.Quote(s)
for _, s := range o.Implements {
satisfiedBy += ", " + strconv.Quote(s.Name)
}
return "[]string{" + satisfiedBy + "}"
}
Expand Down
4 changes: 2 additions & 2 deletions codegen/testserver/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions example/starwars/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/type-system-extension/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 99e9f41

Please sign in to comment.