@girin/framework
Version:
Core modules for Girin: GraphQL server framework
42 lines • 1.13 kB
TypeScript
/// <reference types="node" />
import * as http from 'http';
import { Readable } from 'stream';
import { HttpServer } from '../core/HttpServer';
export interface TestServerModuleConfigs {
host: string;
port: number;
}
export declare class TestHttpServer extends HttpServer {
constructor(configs?: TestServerModuleConfigs);
protected requestOptions: any;
getClient(): TestClient;
}
export declare class TestClient {
requestOptions: {
host: string;
port: number;
} | {
socketPath: string;
};
constructor(requestOptions: {
host: string;
port: number;
} | {
socketPath: string;
});
request(method: string, path: string, body?: any, headers?: any): Promise<{
res: http.IncomingMessage;
body: Buffer;
}>;
sendQuery(data: {
query: string;
variables?: any;
}, headers?: any): Promise<any>;
sendQueryWithFiles(data: {
query: string;
map: any;
variables: any;
files?: Readable[];
}, headers?: any): Promise<any>;
}
//# sourceMappingURL=TestHttpServer.d.ts.map