///
import { PrismaClientInput, PrismaSchemaConfig } from 'nexus-prisma/dist/types';
import Express from 'express';
import { Server as HttpServer } from 'http';
export declare type MaybePromise = Promise | T;
export declare type DatamodelInfo = PrismaSchemaConfig['prisma']['datamodelInfo'];
export declare type InputPrismaConfig = {
/**
* The default exported object generated by `nexus-prisma-generate`
*
* Import it from the output directory generated by `nexus-prisma-generate`
*/
datamodelInfoPath?: string;
/**
* Instance of the prisma-client, either passed statically
* or returned from the context defined in your GraphQL server
*
* @default ./.yoga/prisma-client/index.ts
*/
client?: PrismaClientInput;
};
export declare type InputOutputFilesConfig = {
/**
* Path to the generated typings
* @default ./.yoga/nexus.ts
*/
typegenPath?: string;
/**
* Path to the generated schema
* @default ./src/schema.graphql
*/
schemaPath?: string;
};
export declare type InputConfig = {
/**
* Path to the resolvers directory.
* **Path has to exist**
* @default ./src/graphql/
*/
resolversPath?: string;
/**
* Path to the `context.ts` file to inject a context into your graphql resolvers. **If provided, path has to exist**
* @default ./src/context.ts
*/
contextPath?: string;
/**
* Path to the `types.ts` file to override nexus default types **If provided, path has to exist**
* @default ./src/types.ts
*/
typesPath?: string;
/**
* Path to the `server.ts` file to eject from default configuration file `yoga.config.ts`.
* When provided, all other configuration properties are ignored and should be configured programatically.
* **If provided, path has to exist**
* @default ./src/server.ts
*/
ejectFilePath?: string;
/**
* Path to the `express.ts` file.
* This file gets injected the underlying express instance (to add routes, or middlewares etc...)
* **If provided, path has to exist**
* @default ./src/express.ts
*/
expressPath?: string;
/**
* Config for the outputted files (schema, typings ..)
*/
output?: InputOutputFilesConfig;
/**
* Config for the prisma integration
*/
prisma?: InputPrismaConfig;
};
declare type RequiredProperty = Exclude>, undefined>;
export declare type Config = {
resolversPath: RequiredProperty<'resolversPath'>;
contextPath?: RequiredProperty<'contextPath'>;
ejectFilePath?: RequiredProperty<'ejectFilePath'>;
typesPath?: RequiredProperty<'typesPath'>;
output: RequiredProperty<'output'>;
prisma?: PrismaSchemaConfig['prisma'];
expressPath?: RequiredProperty<'expressPath'>;
};
export declare type ConfigWithInfo = {
yogaConfigPath?: string;
yogaConfig: Config;
projectDir: string;
inputConfig: InputConfig;
datamodelInfoDir?: string;
prismaClientDir?: string;
};
export interface Yoga {
server: () => MaybePromise;
startServer: (params: T) => MaybePromise;
stopServer: (params: U) => any;
}
export {};