-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Warning that injecting a network layer would overwrite a previously injected layer #1122
Comments
This is fixed and will be resolved in the next release (see #1111). Sorry about the noise, and thanks for the report! |
@wincent I still see this warning when using |
@sedubois: That suggests that a layer was already injected. Would need to see some code to troubleshoot further. |
Then everything is working as intended. This is why this is a warning and not an error. The purpose is to help people avoid overwriting a layer by mistake (this actually happened at FB, when two separate teams had their own competing layers in a shared context) but still allow people who have a legitimate reason for injecting more than once to do so, albeit with a warning. If the warning is truly obnoxious to you then we could look at adding a |
@wincent It's actually an error (red and still appears when filtering only for Errors in chrome console):
That would be really welcome, yes 😊 I believe the scenario I described is valid and common, and should therefore not pollute the console. |
It uses |
Since 0.8.1 I am receiving this new warning >>
Warning: RelayNetworkLayer: Call received to injectImplementation(), but a layer was already injected.
<< when I try to inject my default network layer. I want to separate my GraphQL server from my React/Relay app. I have not injected any other network layer before that. Relay seems to do this by default.What is the right way to go about it to avoid this warning?
The text was updated successfully, but these errors were encountered: