[PATCH] cmd/gqlclientgen: recursively collect fragments
Export this patch
This makes fragments that include other fragments work.
---
cmd/gqlclientgen/main.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmd/gqlclientgen/main.go b/cmd/gqlclientgen/main.go
index c3c5f3f..b7a68ac 100644
--- a/cmd/gqlclientgen/main.go
+++ b/cmd/gqlclientgen/main.go
@@ -232,6 +232,7 @@ func collectFragments(frags map[*ast.FragmentDefinition]struct{}, selSet ast.Sel
collectFragments(frags, sel.SelectionSet)
case *ast.FragmentSpread:
frags[sel.Definition] = struct{}{}
+ collectFragments(frags, sel.Definition.SelectionSet)
case *ast.InlineFragment:
collectFragments(frags, sel.SelectionSet)
default:
--
2.33.3
Pushed, thanks!