Skip to content

Commit

Permalink
Fix collectFields to handle aliased fields
Browse files Browse the repository at this point in the history
  • Loading branch information
yamitzky committed Apr 9, 2018
1 parent 4d2eece commit 78f3a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func collectFields(doc *query.Document, selSet []query.Selection, satisfies []st
for _, sel := range selSet {
switch sel := sel.(type) {
case *query.Field:
f := getOrCreateField(&groupedFields, sel.Name.Name, func() CollectedField {
f := getOrCreateField(&groupedFields, sel.Alias.Name, func() CollectedField {
f := CollectedField{
Alias: sel.Alias.Name,
Name: sel.Name.Name,
Expand Down

0 comments on commit 78f3a56

Please sign in to comment.