egg-graphql
egg-graphql copied to clipboard
add support common options with moreOpts key
由于需要格式化返回错误信息,新增了通用配置项
如:
config.graphql = {
router: '/graphql',
moreOpts: {
formatError: error => ({
message: 'interal error',
locations: error.locations,
path: error.path,
}),
},
};