@graphprotocol/graph-cli
Version:
CLI for building for and deploying to The Graph
13 lines (11 loc) • 435 B
JavaScript
export const generatePlaceholderHandlers = ({ entities, contract, }) => `
import { ExampleEntity } from '../generated/schema'
import {${entities.join(', ')}} from '../generated/subgraph-${contract}'
import { EntityTrigger } from '@graphprotocol/graph-ts'
${entities
.map(entityName => `
export function handle${entityName}(entity: EntityTrigger<${entityName}>): void {
// Empty handler for ${entityName}
}`)
.join('\n')}
`;