@corejam/base
Version:
A scaffolding for building progressive GraphQL powered jamstack applications
44 lines (43 loc) • 1.15 kB
TypeScript
/// <reference types="node" />
import { EventEmitter } from "events";
import { ServerContext } from "./typings/Server";
export declare const eventEmitter: EventEmitter;
/**
* Return the appropriate resolvers based on environment setup.
*/
export declare const getServerModels: () => any;
/**
* We only have this extracted to allow us to bootstrap
* the context within our integration tests.
*/
export declare function getServerContext({ req, res }: {
req: any;
res: any;
}): ServerContext;
/**
* Bootstrap the ApolloServer with our relevant schemas / context & models.
* Merge all the plugins.
*
* @param context
*/
export declare function CorejamServer(context?: ({ req, res }: {
req: any;
res: any;
}) => ServerContext): {
typeDefs: import("graphql").DocumentNode;
resolvers: {
Query: {
objectFromURL: (_obj: any, args: any, ctx: any) => any;
};
Paginated: {
__resolveType(): null;
};
Timestamp: {
__resolveType(): null;
};
}[];
context: ({ req, res }: {
req: any;
res: any;
}) => ServerContext;
};