我们需要为 aws amplify graphql 调用实现角度拦截器。我们知道 aws graphql 调用在幕后使用 axios,因此我们尝试在 Angular 中实现 axios 拦截器,但它不起作用。
我们也遵循这个解决方案Interceptor for HttpRequests made by aws API,但是这个函数 axios.interceptors.request.use() 不起作用。
谢谢
回答很晚,但我希望它可以帮助别人: https://medium.com/@ambrosdavid99/intercept-all-graphql-api-calls-with-axios-angular-amplify-appsync-206024abe54c
请务必阅读最后一步,我花了半天时间试图理解为什么我的拦截器在完成后停止工作
npm update