Replies: 2 comments 1 reply
-
Did you ever resolve this? I am trying to do the exact same. I also want to modify the graphql query in certain cases, and reject all mutations |
Beta Was this translation helpful? Give feedback.
1 reply
-
You might want to try using a library like The following example will just respond with 403 on every graphql request. var scope = nock('http://my.domain.com')
.intercept('/graphql', 'POST')
.reply(403); Check their documentation for more fine grained control. Please let us know if you have any succes with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be able to intercept and reject a request through the proxy by examining body content.
For example, my request coming through is a grapql query or mutation in
body
ofPOST
and I want to be able to examine the content body for
registerUser
(or something else) and reject with a403 - Forbidden
.I feel it's similar, but the opposite to here: #97
So I'd like to use
onProxyReq
, but I dont' know how to read the body and then make an action usingreq
/res
. Anyone can help?Beta Was this translation helpful? Give feedback.
All reactions