Skip to content
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

Add ability to silence warnings displayed when re-injecting network layer #1429

Closed
sedubois opened this issue Oct 25, 2016 · 2 comments
Closed

Comments

@sedubois
Copy link

sedubois commented Oct 25, 2016

As discussed here, I believe there is a valid use case for being able to update the network layer (with Relay.injectNetworkLayer) without displaying a confusing warning in the console. For example, during a user sign-in flow.

Besides, the warning is actually displayed as an error, not a warning, in the Javascript console.

@hadfieldn
Copy link

hadfieldn commented Jan 27, 2017

As workaround, I call this prior to calling injectNetworkLayer():

clearNetworkLayer() {
  Relay.Store._storeData.getNetworkLayer()._implementation = null;
}

I haven't noticed any issues with it so far, but all I'm doing with the new layer is changing the header and token used for authentication.

@leebyron
Copy link
Contributor

I'm sorry this issue has sat here for so long. In an attempt to clean up our issue queue we're closing some aging or unclear-action issues. Also, while this issue applies to Relay Classic, our team is trying to focus on Relay Modern going forward.

If this issue is still important to you, please feel free to reopen it with an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants