Copilot commented on code in PR #150:
URL: 
https://github.com/apache/skywalking-query-protocol/pull/150#discussion_r2336685496


##########
trace-v2.graphqls:
##########
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+type TraceList {
+    traces: [TraceV2!]!
+    # The time range of the traces actually retrieved.
+    # If the queryDuration is not given, the time range is the timestamp(ms) 
from now - 1day to now.
+    retrievedTimeRange: RetrievedTimeRange!
+    # For OAP internal query debugging
+    debuggingTrace: DebuggingTrace
+}
+
+type TraceV2 {
+    spans: [Span!]!
+}
+
+type RetrievedTimeRange {
+    # The start time (ms) of the traces actually retrieved.
+    startTime: Long!
+    # The end time (ms) of the traces actually retrieved.
+    endTime: Long!
+}
+
+# Param, if debug is true will enable the query tracing and return 
DebuggingTrace in the result.
+extend type Query {
+    queryTraces(condition: TraceQueryCondition, debug: Boolean): TraceList

Review Comment:
   [nitpick] The `hasQueryTracesV2Support` query appears to be a feature 
detection endpoint. Consider adding documentation about when this would return 
false, or if this is temporary scaffolding for migration, consider adding a 
deprecation timeline.
   ```suggestion
       queryTraces(condition: TraceQueryCondition, debug: Boolean): TraceList
       # Feature detection endpoint: returns true if the backend supports the 
Query Traces V2 API.
       # Returns false if the backend does not support Query Traces V2.
       # This field is intended to assist clients in migrating to the new API.
       # (If applicable: This field may be deprecated in a future release once 
migration is complete.)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to