apollo-server/packages/apollo-datasource/src/index.ts
2018-07-18 16:46:46 -07:00

10 lines
260 B
TypeScript

import { KeyValueCache } from 'apollo-server-caching';
export interface DataSourceConfig<TContext> {
context: TContext;
cache: KeyValueCache;
}
export abstract class DataSource<TContext = any> {
initialize?(config: DataSourceConfig<TContext>): void;
}