{"record":{"id":"8abc1a55e8c956e3","repo":"FuelLabs/fuel-core","slug":"either-first-or-last-should-be-provided","errorCode":null,"errorMessage":"Either `first` or `last` should be provided","messagePattern":"Either `first` or `last` should be provided","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/fuel-core/src/schema.rs","lineNumber":153,"sourceCode":"        }\n        (_, _, None, None) => {\n            return Err(anyhow!(\"The queries for the whole range is not supported\").into())\n        }\n        (_, _, _, _) => { /* Other combinations are allowed */ }\n    };\n\n    query(\n        after,\n        before,\n        first,\n        last,\n        |after: Option<SchemaKey>, before: Option<SchemaKey>, first, last| async move {\n            let (count, direction) = if let Some(first) = first {\n                (first, IterDirection::Forward)\n            } else if let Some(last) = last {\n                (last, IterDirection::Reverse)\n            } else {\n                return Err(anyhow!(\"Either `first` or `last` should be provided\"))\n            };\n\n            let start;\n            let end;\n\n            if direction == IterDirection::Forward {\n                start = after;\n                end = before;\n            } else {\n                start = before;\n                end = after;\n            }\n\n            let entries = entries(&start, direction)?;\n            let mut has_previous_page = false;\n            let mut has_next_page = false;\n\n            // TODO: Add support of `skip` field for pages with huge list of entities with","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/fuel-core/src/schema.rs#L135-L171","documentation":"Error \"Either `first` or `last` should be provided\" thrown in FuelLabs/fuel-core.","triggerScenarios":"Thrown at crates/fuel-core/src/schema.rs:153 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}