warrenday / graphql-network-inspector

A better network inspector for viewing and debugging GraphQL requests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't show "pending" connections

sepsol opened this issue · comments

Describe the bug
In chrome devtools I'm able to identify network requests that are stuck in pending but in this extension (as good as it is) I'm not able to see that pending request until after it is resolved and returns 200 OK to my browser.

To Reproduce
Create a demanding query resolver and make a request to it from the frontend while having your devtools open. Compare the results from the built-in Network tab vs GraphQL Network tab.

Expected behavior
To see a behavior like the native Network tab, i.e. the pending requests show up as pending.

Screenshots

Built-in Network GraphQL Network
2023-02-01_12-02-53 2023-02-01_12-03-17

Desktop (please complete the following information):

  • OS: Windows 11 Version 22H2 (Build 22621.1105)
  • Chrome Version: Vivaldi Version 5.6.2867.62 (Stable channel) (64-bit)

I've spent quite a bit of time trying to make this work, but unfortunately I am yet to find a good solution.

The chrome network API only provides an event for when the request finishes. Which is what we use to display the request.
https://developer.chrome.com/docs/extensions/reference/devtools_network/#event-onRequestFinished

Chrome also supplies a webRequest API which is more for intercepting request headers. But it does allow us to see a request starting. Unfortunately there is no reliable way to associate the webRequest event with a network event.
https://developer.chrome.com/docs/extensions/reference/webRequest/

So as far as I am aware (and I could be wrong) there is no way with a third party extension to display both a request starting and finishing.

Well, that's really unfortunate :( But I appreciate you taking the matter seriously and dedicating time to look into it!

Closing as currently not possible