serverless-appsync-plugin
serverless-appsync-plugin copied to clipboard
Add CLI commands for creating vtl templates
From my perspective, it is a good idea to add a few CLI commands for better developer experience. For example: schema.graphql
sap generate mutation --name createPet
The command will produce:
...
mutation {
createPet: Pet
}
...
type Pet {
}
...
mappings.yml
- dataSource: PetDataSource
type: Mutation
field: createEntity
request: 'create-entity-request-template.vtl'
response: 'create-entity-response-template.vtl'
create-entity-request-template.vtl
{}
create-entity-response-template.vtl
{}
The CLI interface will allow us to speed up the configuration process. If you think that it is a good idea I create a PR with implementation.