Skip to content

Commit 8e79a84

Browse files
fix: reverse space ordering to be sorted asc (#64)
1 parent b2e54ca commit 8e79a84

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

hypertrace-graphql-spaces-schema/src/main/java/org/hypertrace/graphql/spaces/dao/ExplorerBackedSpacesDao.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ private static class ActiveSpaceExploreRequest implements ExploreRequest {
177177
@Value
178178
@Accessors(fluent = true)
179179
private static class SpaceOrderArgument implements AggregatableOrderArgument {
180-
OrderDirection direction = OrderDirection.DESC;
180+
OrderDirection direction = OrderDirection.ASC;
181181
String key = ActiveSpaceExploreRequest.SPACE_IDS_KEY;
182182
MetricAggregationType aggregation = null;
183183
Integer size = null;

hypertrace-graphql-spaces-schema/src/test/java/org/hypertrace/graphql/spaces/dao/ExplorerBackedSpacesDaoTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.hypertrace.graphql.spaces.dao;
22

3+
import static org.hypertrace.core.graphql.common.schema.results.arguments.order.OrderDirection.ASC;
34
import static org.hypertrace.core.graphql.common.schema.results.arguments.order.OrderDirection.DESC;
45
import static org.junit.jupiter.api.Assertions.assertEquals;
56
import static org.mockito.ArgumentMatchers.any;
@@ -93,7 +94,7 @@ void makesAppropriateRequest() {
9394
&& request.orderArguments().size() == 1
9495
&& request.orderArguments().get(0).attribute().equals(this.mockAttribute)
9596
&& request.orderArguments().get(0).value().key().equals("spaceIds")
96-
&& request.orderArguments().get(0).value().direction().equals(DESC)
97+
&& request.orderArguments().get(0).value().direction().equals(ASC)
9798
&& request.filterArguments().isEmpty()
9899
&& request
99100
.groupByAttributeRequests()

0 commit comments

Comments
 (0)