Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
minhaj-shakeel committed Nov 23, 2020
1 parent 3f3a46a commit c7e96db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions graphql/resolve/query_rewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,10 +1151,7 @@ func addSelectionSetFrom(
auth.varName = parentQryName
}

// skip if we have already added a query for this field in DQL. It helps make sure that if
// a field is being asked twice or more, each time with a new alias, then we only add it
// once in DQL query.
if _, ok := fieldAdded[f.DgraphAlias()]; ok {
if f.Type().IsInbuiltOrEnumType() && (fieldSeenCount[f.DgraphAlias()] > 0) {
continue
}
fieldSeenCount[f.DgraphAlias()]++
Expand Down

0 comments on commit c7e96db

Please sign in to comment.