mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-12 01:45:14 +02:00
mr-668: drop unused State extractor from 7 read-only handlers
After the routing-middleware refactor moved the engine into the per-graph `GraphHandle` (extracted via `Extension<Arc<GraphHandle>>`), seven read-only handlers — `server_snapshot`, `server_read`, `server_export`, `server_schema_get`, `server_branch_list`, `server_commit_list`, `server_commit_show` — kept an unused `State(_state): State<AppState>` extractor. Drop it. Each request avoids one `FromRequestParts` clone of `AppState`'s Arcs. Handlers that actually use state (workload admission for write paths, `server_policy` for management endpoints) keep theirs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0da750c096
commit
dcb2dde456
1 changed files with 0 additions and 7 deletions
|
|
@ -1497,7 +1497,6 @@ fn authorize_request(
|
|||
/// count) for every table on the branch. Defaults to `main` when `branch` is
|
||||
/// omitted. Read-only.
|
||||
async fn server_snapshot(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
Query(query): Query<SnapshotQuery>,
|
||||
|
|
@ -1543,7 +1542,6 @@ async fn server_snapshot(
|
|||
/// match the parameters declared by the query. Returns rows as a JSON array
|
||||
/// plus a `columns` list. Read-only.
|
||||
async fn server_read(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
Json(request): Json<ReadRequest>,
|
||||
|
|
@ -1616,7 +1614,6 @@ async fn server_read(
|
|||
/// streams the entire branch. Suitable for large exports — the response is
|
||||
/// streamed, not buffered. Read-only.
|
||||
async fn server_export(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
Json(request): Json<ExportRequest>,
|
||||
|
|
@ -1759,7 +1756,6 @@ async fn server_change(
|
|||
/// Useful for clients that want to introspect available types and tables
|
||||
/// before constructing GQ queries. Read-only.
|
||||
async fn server_schema_get(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
) -> std::result::Result<Json<SchemaOutput>, ApiError> {
|
||||
|
|
@ -1948,7 +1944,6 @@ async fn server_ingest(
|
|||
///
|
||||
/// Returns branch names sorted alphabetically. Read-only.
|
||||
async fn server_branch_list(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
) -> std::result::Result<Json<BranchListOutput>, ApiError> {
|
||||
|
|
@ -2177,7 +2172,6 @@ async fn server_branch_merge(
|
|||
/// Filter by `branch` to get the commits on a single branch (most recent
|
||||
/// first); omit to list across all branches. Read-only.
|
||||
async fn server_commit_list(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
Query(query): Query<CommitListQuery>,
|
||||
|
|
@ -2223,7 +2217,6 @@ async fn server_commit_list(
|
|||
/// Returns the commit's manifest version, parent commit(s), and creation
|
||||
/// metadata. Read-only.
|
||||
async fn server_commit_show(
|
||||
State(_state): State<AppState>,
|
||||
Extension(handle): Extension<Arc<GraphHandle>>,
|
||||
actor: Option<Extension<ResolvedActor>>,
|
||||
Path(commit_id): Path<String>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue