envelop
envelop copied to clipboard
useDisableIntrospection - Dynamic enable/disable of introspection is not working
Hi,
I've been using useDisableIntrospection
to disable introspection and only expose if a header value is passed to the server. This works correctly 1st time. But if I add or remove the header the disableif
is called correctly. Looking at the source code there is no mechanism to remove the previous enable/disable and push the new validation rule. So if you start off disabled you stay disabled. Or vice-versa.
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- [ ] 1. The issue provides a minimal reproduction available on Stackblitz.
-
Please install the latest
@envelop/*
packages that you are using. - Please make sure the reproduction is as small as possible.
-
Please install the latest
- [ ] 2. A failing test has been provided
- [ ] 3. A local solution has been provided
- [ ] 4. A pull request is pending review
Describe the bug
To Reproduce Steps to reproduce the behavior:
Expected behavior
Environment:
- OS:
- NodeJS:
-
@envelop/*
versions:-
@envelop/core
:???
-
Additional context
can you provide a codesandbox for this?
Hey @aylesm, can you please provide a reproduction? Are you sure you call getEnveloped
for each incoming request separately?
file a new issue with reproduction