Skip to content

Commit ef2b3a1

Browse files
committed
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.
1 parent 344270d commit ef2b3a1

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

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
@@ -848,6 +848,16 @@
848848
"ofType": null
849849
},
850850
"defaultValue": "0"
851+
},
852+
{
853+
"name": "orderDirection",
854+
"description": "Sort direction for results. Default: desc (newest first).",
855+
"type": {
856+
"kind": "ENUM",
857+
"name": "OrderDirection",
858+
"ofType": null
859+
},
860+
"defaultValue": "desc"
851861
}
852862
],
853863
"type": {

0 commit comments

Comments
 (0)