0.0.7 • Published 3 years ago
@micra/apollo-express-kernel v0.0.7
About
Micra Kernel to run an Express-based Apollo GraphQL server.
Installation
yarn add @micra/apollo-express-kernel
Usage
Config file
In your app
config:
import app from '@micra/application';
import { ApolloExpressKernel } '@micra/apollo-express-kernel';
import type { AppConfig } from '@micra/application';
app.config.set<AppConfig>('app', {
kernel: ApolloExpressKernel,
// ...rest
});
Requirements
Services
interface Services {
server: import('express').Express;
graphql: import('@micra/micra-graphql-container').GraphQLContainer;
}
Configurations
interface Config {
server: {
errorHandler?: import('express').ErrorRequestHandler;
middlewares: import('express').RequestHandler[];
};
graphql: {
graphqlPath?: string;
options: import('apollo-server-express').Config;
};
}
Environment variables
interface EnvironmentVariables {
PORT?: string;
PATH_TO_SCHEMA?: string;
AWS_LOAD_BALANCER_IDLE_TIMEOUT: string;
KEEP_ALIVE_TIMEOUT: string;
HEADERS_TIMEOUT: string;
}