graphql-network-inspector
graphql-network-inspector copied to clipboard
Support using proxy/ngrok
Is your feature request related to a problem? Please describe. This is a pretty sweet UI and would love to be able to use this similar to how ngrok works (which we currently use for mobile development).
Describe the solution you'd like
You run a command, e.g. gqlinspect http <some-port>
- it creates a service on your localhost that proxies some-port
and publishes this to a new port (e.g. 3001). Then you can setup your graphql client to communicate on port 3001 while being able to use graphql-network-inspect to inspect the contents easily! 🎉
-endpoint: "http://localhost:3000/graphql",
+endpoint: "http://localhost:3001/graphql", // proxies to port 3000 but with sweet graphql-network-inspector UI
Describe alternatives you've considered
Modifying the ngrok page (http://127.0.0.1:4040/inspect/http) with a chrome extension to replace POST /graphql
with Query Profile(id: 123)
Additional context We spend tremendeous amount of aggregated time in finding a specific request in the haystack of requests while developing/debugging. Having a cleaner and more graphql oriented solution would help save a lot of time.
Hey @simplenotezy
What does your current debugging process look like, are you pulling up chrome devtools using remote debugging? I'm just thinking would it be possible to enable extensions on devtools this way, if so you'd be able to access the UI.
hey @warrenday - no I don't use chrome. I just boot up our backend server and run ngrok http 3000
We did actually explore a desktop version of the app at one point, it creates a local proxy server, and intercept all requests. However proved unpopular so I stopped development.
Could be worth a go for your use case.
https://github.com/warrenday/graphql-network-inspector-desktop/releases
Interesting @warrenday - how does it work? Does it proxy?
Closing as no plan to integrate with a proxy service. We only read from the browser HAR logs.