Graphql 如何获取阿波罗测角仪的网络误差

Graphql 如何获取阿波罗测角仪的网络误差,graphql,angular8,apollo-client,graphql-js,apollo-angular,Graphql,Angular8,Apollo Client,Graphql Js,Apollo Angular,我正在使用apollo angular,我正在尝试找出如何在graphql查询返回的Promise中获取网络错误。目前,我通过以下方式发送查询: return this._requestController.makeRequest(async (requestId: string) => { const result = await this._apollo.query<T>({ query, variables, context: { headers: { 'Re

我正在使用apollo angular,我正在尝试找出如何在graphql查询返回的Promise中获取网络错误。目前,我通过以下方式发送查询:

return this._requestController.makeRequest(async (requestId: string) => {
      const result = await this._apollo.query<T>({ query, variables, context: { headers: { 'Request-Id': requestId }} }).toPromise();
      return result.data;
    });
返回此值。_requestController.makeRequest(异步(requestId:string)=>{
const result=wait this._apollo.query({query,variables,context:{headers:{'Request Id':requestId}}}).toPromise();
返回结果数据;
});
但当我出现网络错误时,不会返回任何内容。我可以在graphql模块的中间件中得到这个错误,但是如何在查询承诺中返回这个错误呢