@@ -75,11 +75,11 @@ export const Target: Pick<
75
75
schemaCoordinate : args . schemaCoordinate ,
76
76
} ;
77
77
} ,
78
- traces : async ( _parent , { first, filter } , { injector } ) => {
78
+ traces : async ( target , { first, filter } , { injector } ) => {
79
79
const clickhouse = injector . get ( ClickHouse ) ;
80
80
const limit = ( first ?? 10 ) + 1 ;
81
81
82
- const ANDs : SqlValue [ ] = [ sql `target_id = ${ ' target-1' } ` ] ;
82
+ const ANDs : SqlValue [ ] = [ sql `target_id = ${ target . id } ` ] ;
83
83
84
84
if ( filter ?. id ?. length ) {
85
85
ANDs . push ( sql `trace_id IN (${ sql . array ( filter . id , 'String' ) } )` ) ;
@@ -102,11 +102,11 @@ export const Target: Pick<
102
102
}
103
103
104
104
if ( filter ?. operationName ?. length ) {
105
- ANDs . push ( sql `operation_name IN (${ sql . array ( filter . operationName , 'String' ) } )` ) ;
105
+ ANDs . push ( sql `graphql_operation_name IN (${ sql . array ( filter . operationName , 'String' ) } )` ) ;
106
106
}
107
107
108
108
if ( filter ?. operationType ?. length ) {
109
- ANDs . push ( sql `operation_type IN (${ sql . array ( filter . operationType , 'String' ) } )` ) ;
109
+ ANDs . push ( sql `graphql_operation_type IN (${ sql . array ( filter . operationType , 'String' ) } )` ) ;
110
110
}
111
111
112
112
if ( filter ?. subgraphs ?. length ) {
@@ -156,8 +156,8 @@ export const Target: Pick<
156
156
trace_id,
157
157
span_id,
158
158
timestamp,
159
- operation_name,
160
- operation_type,
159
+ graphql_operation_name as operation_name,
160
+ graphql_operation_type as operation_type,
161
161
duration,
162
162
subgraph_names,
163
163
http_status_code,
@@ -177,6 +177,8 @@ export const Target: Pick<
177
177
const traces = tracesQuery . data ;
178
178
let hasNext = false ;
179
179
180
+ console . log ( 'AYAYAYAY' , traces . length ) ;
181
+
180
182
if ( traces . length == limit ) {
181
183
hasNext = true ;
182
184
( traces as any ) . pop ( ) ;
@@ -242,11 +244,11 @@ export const Target: Pick<
242
244
}
243
245
244
246
if ( filter ?. operationName ?. length ) {
245
- ANDs . push ( sql `operation_name IN (${ sql . array ( filter . operationName , 'String' ) } )` ) ;
247
+ ANDs . push ( sql `graphql_operation_name IN (${ sql . array ( filter . operationName , 'String' ) } )` ) ;
246
248
}
247
249
248
250
if ( filter ?. operationType ?. length ) {
249
- ANDs . push ( sql `operation_type IN (${ sql . array ( filter . operationType , 'String' ) } )` ) ;
251
+ ANDs . push ( sql `graphql_operation_type IN (${ sql . array ( filter . operationType , 'String' ) } )` ) ;
250
252
}
251
253
252
254
if ( filter ?. subgraphs ?. length ) {
0 commit comments