apollo-client
apollo-client copied to clipboard
Is it possible to disable DevTools message?
Download the Apollo DevTools for a better development experience: https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/
I'm running a fully functioning Apollo Client in my tests (as I'm using MSW for testing https://mswjs.io/) and I have this annoying message in the stdout above. Is it possible to disable it?
@RIP21 👋 Thanks for asking about this. We'll definitely consider if this message is useful or annoying to people. In your case it sounds like it's less useful. 😄
For reference The block of code that controls this seems to be here
Wondering from what place __DEV__
is coming :) Aaaanyway, I'll probably patch that line of code using pnpm patch
(if you using other package manager you can use patch-package
package)
Another hack is to set in the setupTests.ts
e.g. your global test file however it's named
globalThis.__DEV__ = false
You would like to ignore the TS issue with that obviously :)
@jpvajda @RIP21 Hello, I put a fix. I think use header will be a good solution for this issue. Please review the PR and let me know if it works
@jpvajda please let me know if you want me ignore the prettier style change
@chris110408 thanks for the PR chris! We'll take a look at this and see if we can get it merged in soon. cc @MrDoomBringer / @bignimbus