@jackchuka/gql-ingest
Version:
A CLI tool for ingesting data from CSV files into a GraphQL API
21 lines • 671 B
TypeScript
export interface DataRow {
[]: any;
}
export declare abstract class DataReader {
abstract readFile(filePath: string): Promise<DataRow[]>;
/**
* Get the supported file extensions for this reader
*/
abstract getSupportedExtensions(): string[];
/**
* Check if this reader can handle the given file
*/
canHandle(filePath: string): boolean;
}
export declare class DataReaderFactory {
private static readers;
static registerReader(reader: DataReader): void;
static getReader(filePath: string, format?: string): DataReader;
static getSupportedFormats(): string[];
}
//# sourceMappingURL=data-reader.d.ts.map