Skip to content

Commit

Permalink
Fix interface casing
Browse files Browse the repository at this point in the history
fixes #694
  • Loading branch information
vektah committed May 8, 2019
1 parent e49d44f commit 46c40b7
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 1 deletion.
145 changes: 145 additions & 0 deletions codegen/testserver/generated.go

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

16 changes: 16 additions & 0 deletions codegen/testserver/models-gen.go

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

10 changes: 10 additions & 0 deletions codegen/testserver/validtypes.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ input ValidInput {
_: String!
}

# see https://github.com/99designs/gqlgen/issues/694
type Content_User {
foo: String
}

type Content_Post {
foo: String
}

union Content_Child = Content_User | Content_Post
2 changes: 1 addition & 1 deletion plugin/modelgen/models.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

{{- range $iface := .Implements }}
func ({{ $model.Name|go }}) Is{{ $iface }}() {}
func ({{ $model.Name|go }}) Is{{ $iface|go }}() {}
{{- end }}
{{- end}}

Expand Down

0 comments on commit 46c40b7

Please sign in to comment.