diff --git a/crates/torii/server/src/proxy.rs b/crates/torii/server/src/proxy.rs index f6fdbd04bb..2808db2295 100644 --- a/crates/torii/server/src/proxy.rs +++ b/crates/torii/server/src/proxy.rs @@ -267,7 +267,9 @@ async fn handle( "TEXT" => row .get::, _>(i) .map_or(serde_json::Value::Null, serde_json::Value::String), - "INTEGER" => row + // for operators like count(*) the type info is NULL + // so we default to a number + "INTEGER" | "NULL" => row .get::, _>(i) .map_or(serde_json::Value::Null, |n| { serde_json::Value::Number(n.into())