sofa-api
Version:
Create REST APIs with GraphQL
17 lines (16 loc) • 514 B
TypeScript
import type { Sofa } from './sofa.js';
import { Response, type Router } from 'fets';
export type ErrorHandler = (errors: ReadonlyArray<any>) => Response;
declare module 'graphql' {
interface GraphQLHTTPErrorExtensions {
spec?: boolean;
status?: number;
headers?: Record<string, string>;
}
interface GraphQLErrorExtensions {
http?: GraphQLHTTPErrorExtensions;
}
}
export declare function createSofaRouter(sofa: Sofa): Router<any, {}, {
[TKey: string]: never;
}>;