I'm using react-relay v12.
When logging out, should I create a new relay environment (rather than e.g. clearing the store somehow)? I have been doing just that, but I'm now having problems because the Relay environment in the RelayEnvironmentProvider context is not updated. In theory I could manually update this using a hook, but this is difficult in certain places (e.g. relay network middleware, state containers)
The easiest solution seems to be to avoid creating a new store and instead clear the old one. Is that possible? Or is there a better solution?