ember-apollo-client
ember-apollo-client copied to clipboard
Disable "Download the Apollo DevTools for a better development experience" warning
This is caused by an upstream change I guess, but I now get this console log:
LOG: Download the Apollo DevTools for a better development experience: https://...
Both in development as well as in my test output. I have googled a bit but not found a way to disable it so far... I tried adding this to my tests/index.html:
<script>
__REACT_DEVTOOLS_GLOBAL_HOOK__ = true;
</script>
And also setting connectToDevTools: false
in my tests, but still get the message. Would be great to find a way to disable this message!
Just use __APOLLO_DEVTOOLS_GLOBAL_HOOK__
instead.
I was searching the library for a switch and finally found it in line 209 in the ApolloClient.ts, wich checks for !(window as any).__APOLLO_DEVTOOLS_GLOBAL_HOOK__
I added this line to my index.tsx
window['__APOLLO_DEVTOOLS_GLOBAL_HOOK__'] = true
Nice! I guess this could maybe be handled by this addon as well (?), but for now I can add it manually to my app.js as well!