有没有办法在 Chrome DevTools 中调试 Apollo GraphQL 订阅? [英] Is there a way to debug Apollo GraphQL subscriptions in Chrome DevTools?

查看:25
本文介绍了有没有办法在 Chrome DevTools 中调试 Apollo GraphQL 订阅?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Chrome DevTools 的 Network 选项卡中,我只能找到 GraphQL 查询和突变请求:

In the Network tab of the Chrome DevTools, I can only find GraphQL queries and mutations requests:

在侦听 GraphQL 订阅并接收响应时,此选项卡中没有任何显示.还有其他地方可以从 Chrome DevTools 获取 GraphQL 订阅吗?

While listening to a GraphQL subscription, and receiving a response, nothing appears in this tab. Is there another place to fetch GraphQL subscription from the Chrome DevTools?

有关信息,我使用 apollo-clientapollo-angular.

For information, I am using apollo-client with apollo-angular.

推荐答案

在 Chrome DevTools 的 Network 选项卡中,您应该将过滤器切换到 WS 以查看和调试您的 Apollo GraphQL 订阅.您可以在下面的图片中看到它:

In the Network tab of the Chrome DevTools, you should switch the filter to WS to see and debug your Apollo GraphQL subscription. You can see it in the pictures below:

这篇关于有没有办法在 Chrome DevTools 中调试 Apollo GraphQL 订阅?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆