Skip to content

Commit fd061b4

Browse files
fordNclaude
andcommitted
graph, tests: Fix clippy warning and update _logs introspection schema
Use map_while instead of filter_map on lines() iterator to properly handle read errors, and add missing orderDirection argument to the _logs field in mock introspection JSON. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 58d4665 commit fd061b4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

graph/src/components/log_store/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl FileLogStore {
123123

124124
let kept_entries: Vec<String> = reader
125125
.lines()
126-
.filter_map(|line| line.ok())
126+
.map_while(Result::ok)
127127
.filter(|line| {
128128
// Parse timestamp from log entry
129129
if let Some(entry) = self.parse_line(line) {

store/test-store/tests/graphql/mock_introspection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,16 @@
825825
"ofType": null
826826
},
827827
"defaultValue": "0"
828+
},
829+
{
830+
"name": "orderDirection",
831+
"description": "Sort direction for results. Default: desc (newest first).",
832+
"type": {
833+
"kind": "ENUM",
834+
"name": "OrderDirection",
835+
"ofType": null
836+
},
837+
"defaultValue": "desc"
828838
}
829839
],
830840
"type": {

0 commit comments

Comments
 (0)