egg-graphql icon indicating copy to clipboard operation
egg-graphql copied to clipboard

add support common options with moreOpts key

Open aegeansea opened this issue 7 years ago • 0 comments

由于需要格式化返回错误信息,新增了通用配置项

如:

  config.graphql = {
    router: '/graphql',
    moreOpts: {
      formatError: error => ({
        message: 'interal error',
        locations: error.locations,
        path: error.path,
      }),
    },
  };

aegeansea avatar Jun 21 '18 08:06 aegeansea