~emersion/gqlclient-dev

cmd/gqlclientgen: recursively collect fragments v1 APPLIED

Tadeo Kondrak: 1
 cmd/gqlclientgen: recursively collect fragments

 1 files changed, 1 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/gqlclient-dev/patches/33864/mbox | git am -3
Learn more about email & git

[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!