You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we parse any unhandled request just to see if it's not a GraphQL request. We do that to provide a bit better developer experience by including the operation type and name in the unhandled request warning message.
However, because of this, everybody ends up with all GraphQL dependencies even if they are not mocking anything GraphQL related. This has also been reported to end up with a lot of additional modules imported when using MSW (by @thepassle).
Solution
Remove request parsing from onUnhandledRequest at all.
Log out request method and path. This is sufficient to help the developer debug what's unmatched.
Scope
Improves an existing behavior
Compatibility
Feature description
Right now, we parse any unhandled request just to see if it's not a GraphQL request. We do that to provide a bit better developer experience by including the operation type and name in the unhandled request warning message.
However, because of this, everybody ends up with all GraphQL dependencies even if they are not mocking anything GraphQL related. This has also been reported to end up with a lot of additional modules imported when using MSW (by @thepassle).
Solution
onUnhandledRequest
at all.The text was updated successfully, but these errors were encountered: