-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow suppressing invariant log messages #11655
Conversation
@iiroj: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
👷 Deploy request for apollo-client-docs pending review.Visit the deploys page to approve it
|
🦋 Changeset detectedLatest commit: c68daa9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
8a21ebb
to
f59279c
Compare
f59279c
to
c68daa9
Compare
I think this should already be possible without code changes in Apollo Client:
Could you please try that before we further go down this route? |
@phryneas thank you, I will test. If that works, maybe at least a documentation update would be nice. |
@phryneas I can confirm that setting the verbosity of
|
I'd be happy to accept a PR that does 1. here - I don't think we need to ship additional code for this, but an edit to the documentation to highlight this would be very welcome! |
Just to make sure: how about re-exporting |
Yeah, I think that would be fine. |
setVerbosity
from ts-invariant
setVerbosity
from ts-invariant
Hello,
as a happy user of Apollo Client, I would like to completely suppress the invariant log errors in my production environment. I don't want to load all the error codes into the bundle, nor do I want to output the fallback message linking to https://go.apollo.dev/ into the console.
I opened this small PR that adds a new method for achieving this:
Where
setVerbosity
is just directly re-exported fromts-invariant
.There doesn't seem to be any existing tests for this functionality, but I'm happy to create some if necessary.EDIT: I found a place to add an unit test.Feel free to merge, edit, or reject this pull request. Since the change is small enough, I figured it's easier to just create a PR rather than submit an issue for the feature request first.