@@ -13,6 +13,7 @@ import {
1313} from "@secondlayer/shared/db/queries/marketplace" ;
1414import { getSubgraph } from "@secondlayer/shared/db/queries/subgraphs" ;
1515import { pgSchemaName } from "@secondlayer/shared/db/queries/subgraphs" ;
16+ import type { SubgraphDefinition } from "@secondlayer/subgraphs" ;
1617import { Hono } from "hono" ;
1718import { getAccountId , getApiKeyId } from "../lib/ownership.ts" ;
1819import {
@@ -30,7 +31,7 @@ const app = new Hono();
3031
3132async function query ( text : string , params : unknown [ ] = [ ] ) {
3233 const client = getRawClient ( ) ;
33- return client . unsafe ( text , params ) ;
34+ return client . unsafe ( text , params as never [ ] ) ;
3435}
3536
3637// ── Browse public subgraphs ─────────────────────────────────────────────
@@ -379,10 +380,10 @@ app.post("/subgraphs/:name/fork", requireAuth(), async (c) => {
379380 }
380381
381382 // Import the copied handler to get definition
382- let def : Record < string , unknown > ;
383+ let def : SubgraphDefinition ;
383384 try {
384385 const mod = await import ( `${ newHandlerPath } ?t=${ Date . now ( ) } ` ) ;
385- def = ( mod . default ?? mod ) as Record < string , unknown > ;
386+ def = ( mod . default ?? mod ) as SubgraphDefinition ;
386387 } catch ( err ) {
387388 return c . json (
388389 { error : `Failed to load handler: ${ getErrorMessage ( err ) } ` } ,
0 commit comments