Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zzh8829 committed Feb 14, 2024
1 parent 3888fd1 commit 2f00bfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.

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

9 changes: 4 additions & 5 deletions generate/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,11 @@ func (typ *goInterfaceType) WriteDefinition(w io.Writer, g *generator) error {
// implement nested interface union type
for _, sharedField := range typ.SharedFields {
if sharedField.IsAbstract() {
name := sharedField.GoName
if name == "" {
name = sharedField.GoType.Reference()
// embedded type
if sharedField.GoName == "" {
fmt.Fprintf(w, "func (v *%s) %s() {}\n",
impl.Reference(), fmt.Sprintf("implementsGraphQLInterface%s", sharedField.GoType.Reference()))
}
fmt.Fprintf(w, "func (v *%s) %s() {}\n",
impl.Reference(), fmt.Sprintf("implementsGraphQLInterface%s", name))
}
}
}
Expand Down

0 comments on commit 2f00bfb

Please sign in to comment.