Skip to content

Commit

Permalink
FIXUP
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Sep 15, 2022
1 parent 6f21897 commit 926c38e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions query/graphql/mapper/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ func resolveAggregates(
}
} else {
childObjectIndex := mapping.FirstIndexOfName(target.hostExternalName)
convertedFilter = ToFilter(target.filter, mapping.ChildMappings[childObjectIndex])
childMapping := mapping.ChildMappings[childObjectIndex]
convertedFilter = ToFilter(target.filter, childMapping)
host, hasHost = tryGetTarget(
target.hostExternalName,
convertedFilter,
target.limit,
toOrderBy(target.order, childMapping),
fields,
)
}
Expand Down Expand Up @@ -1275,14 +1277,16 @@ func tryGetTarget(
name string,
filter *Filter,
limit *Limit,
order *OrderBy,
collection []Requestable,
) (Requestable, bool) {
dummyTarget := Targetable{
Field: Field{
Name: name,
},
Filter: filter,
Limit: limit,
Filter: filter,
Limit: limit,
OrderBy: order,
}

for _, field := range collection {
Expand Down

0 comments on commit 926c38e

Please sign in to comment.