How to set up Apollo client only after user authenticates?
问题 I'm a bit confused on how to structure my React/GraphQL (Apollo) app when no connection should be made until the user authenticates/logs in. Currently I have this: class App extends Component { render() { return ( <ApolloProvider client={client}> <Provider store={store}> <Router> <div> <ul> <li><Link to="/">Home</Link></li> <li><Link to="/login">Log In</Link></li> <li><Link to="/signup">Sign Up</Link></li> </ul> <AuthenticatedRoute exact path="/" component={HomePage} /> <Route path="/login"