graphql-network-inspector
graphql-network-inspector copied to clipboard
Block request by Operation Name (query name)
Is your feature request related to a problem? Please describe. I'm very frustrated by the fact when I'm testing and want to cover error cases can't block specific queries/mutations. Blocking API endpoint would not work here as everything will be blocked
Describe the solution you'd like A clear and concise description of what you want to happen. I would like to be able to click on any operation name from the list and just block it for or block it for x amount of time.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. n/a
Additional context Add any other context or screenshots about the feature request here. n/a
Hey thanks for raising this.
When you say block do you mean hold the request and leave it hanging for a time period or forever, or do you mean force the request to return an error of your choosing?
Depending on project goals I guess. I see it go in two directions.
First, simpler just features in pair with what dev tools already have. Simple block by operation name.
Second, more complex let's say something along the lines of cypress.intercept
.
Currently, you can intercept requests with the desktop app (beta). If you're interested in the product I can add request blocking as well. https://www.graphproxy.com/
For more details on mocking/intercepting requests check out the docs page "mocking" section. https://graphproxy.com/docs
Hopefully this can solve your problem.
I know about that, but I'm using Linux.
The main focus is on desktop right now. But i'll check the chrome api to see if blocking is possible. However for the case of returning different data/errors would only be possible with a desktop app.
Closing as we cannot block requests with the chrome api.