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 {
7373} from './shared/graphql/model/schema/metrics/graphql-metric-aggregation-type' ;
7474export * from './shared/graphql/model/schema/sort/graphql-sort-argument' ;
7575export * from './shared/graphql/model/schema/sort/graphql-sort-direction' ;
76+ export * from './shared/graphql/model/schema/sort/graphql-sort-without-direction' ;
7677export * from './shared/graphql/model/schema/sort/graphql-sort-by-specification' ;
7778export * from './shared/graphql/model/schema/timerange/graphql-time-range' ;
7879export * 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' ;
22import {
33 AttributeMetadataType ,
44 convertToGraphQlMetricAggregationType ,
55 GraphQlMetricAggregationType ,
6+ GraphQlSortWithoutDirection ,
67 MetricAggregationType
78} from '@hypertrace/distributed-tracing' ;
89import { GraphQlEnumArgument } from '@hypertrace/graphql-client' ;
@@ -47,10 +48,17 @@ export class ExploreSpecificationBuilder {
4748 children : [ { path : 'value' } , { path : 'type' } ]
4849 } ) ,
4950 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+ }
5462 } ;
5563 }
5664
You can’t perform that action at this time.
0 commit comments