File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
observability/src/shared/graphql/request/builders/specification/explore Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ export {
73
73
} from './shared/graphql/model/schema/metrics/graphql-metric-aggregation-type' ;
74
74
export * from './shared/graphql/model/schema/sort/graphql-sort-argument' ;
75
75
export * from './shared/graphql/model/schema/sort/graphql-sort-direction' ;
76
+ export * from './shared/graphql/model/schema/sort/graphql-sort-without-direction' ;
76
77
export * from './shared/graphql/model/schema/sort/graphql-sort-by-specification' ;
77
78
export * from './shared/graphql/model/schema/timerange/graphql-time-range' ;
78
79
export * from './shared/graphql/model/schema/specifier/specification' ;
Original file line number Diff line number Diff line change 1
- import { DateCoercer } from '@hypertrace/common' ;
1
+ import { DateCoercer , Dictionary } from '@hypertrace/common' ;
2
2
import {
3
3
AttributeMetadataType ,
4
4
convertToGraphQlMetricAggregationType ,
5
5
GraphQlMetricAggregationType ,
6
+ GraphQlSortWithoutDirection ,
6
7
MetricAggregationType
7
8
} from '@hypertrace/distributed-tracing' ;
8
9
import { GraphQlEnumArgument } from '@hypertrace/graphql-client' ;
@@ -47,10 +48,17 @@ export class ExploreSpecificationBuilder {
47
48
children : [ { path : 'value' } , { path : 'type' } ]
48
49
} ) ,
49
50
extractFromServerData : serverData => serverData [ queryAlias ] ,
50
- asGraphQlOrderByFragment : ( ) => ( {
51
- key : key ,
52
- aggregation : aggregation === undefined ? undefined : this . aggregationAsEnum ( aggregation )
53
- } )
51
+ asGraphQlOrderByFragment : ( ) => {
52
+ const fragment : GraphQlSortWithoutDirection & Dictionary < unknown > = {
53
+ key : key
54
+ } ;
55
+
56
+ if ( aggregation !== undefined ) {
57
+ fragment . aggregation = this . aggregationAsEnum ( aggregation ) ;
58
+ }
59
+
60
+ return fragment ;
61
+ }
54
62
} ;
55
63
}
56
64
You can’t perform that action at this time.
0 commit comments