UNPKG

@graphprotocol/graph-cli

Version:

CLI for building for and deploying to The Graph

39 lines (38 loc) 1.27 kB
import immutable from 'immutable'; import Protocol from './protocols/index.js'; export interface TypeGeneratorOptions { sourceDir?: string; subgraphManifest: string; subgraph?: string; protocol: Protocol; outputDir: string; skipMigrations?: boolean; uncrashable: boolean; uncrashableConfig: string; subgraphSources: string[]; ipfsUrl: string; } export default class TypeGenerator { private sourceDir; private options; private protocol; private protocolTypeGenerator; constructor(options: TypeGeneratorOptions); generateTypes(): Promise<boolean>; generateUncrashableEntities(graphSchema: any): Promise<any>; loadSubgraph({ quiet }?: { quiet: boolean; }): Promise<any>; loadSchema(subgraph: immutable.Map<any, any>): Promise<any>; generateTypesForSchema({ schema, fileName, // Default file name outputDir, // Default output directory generateStoreMethods, }: { schema: any; fileName?: string; outputDir?: string; generateStoreMethods?: boolean; }): Promise<any>; generateTypesForDataSourceTemplates(subgraph: immutable.Map<any, any>): Promise<any>; getFilesToWatch(): Promise<string[]>; watchAndGenerateTypes(): Promise<void>; }