Arc
Arc copied to clipboard
支持graphql中type的方法
一个实体在graphql中对应一个type,而实体的无参方法在graphql中会被当成属性,如:
type Project {
delete: Boolean
}
delete
为Project
的一个方法,对应代码生成器也无法正确生成handleDelete
方法
会在 1.6.0 中支持. 详情 -> #79
用法: 使用内置directive @Action
directive @Action on FIELD_DEFINITION
type Project {
delete: Boolean @Action
}