diff --git a/src/Query/Query.php b/src/Query/Query.php index e6a5834..39ef10e 100644 --- a/src/Query/Query.php +++ b/src/Query/Query.php @@ -106,13 +106,14 @@ final class Query return Edge::fromArray((array)$edgeData); - })->sortBy(['depth', 'asc'], ['rank', 'desc'])->values()->toArray(); + })->sortBy("rank")->values()->toArray(); $queryParentEdges = collect($parentEdges)->map(function ($edgeData) { + return Edge::fromArray((array)$edgeData); - })->sortBy(['depth', 'asc'], ['rank', 'desc'])->values()->toArray(); + })->sortBy("rank")->values()->toArray();