Reset store after logout with Apollo client : <p>I'm trying to reset the store after logout in my react-apollo application.</p>

<p>So I've created a method called "logout" which is called when I click on a button (and passed by the 'onDisconnect' props). </p>

<p>To do that I've tried to follow this example :
<a href="https://www.apollographql.com/docs/react/recipes/authentication.html" rel="noreferrer">https://www.apollographql.com/docs/react/recipes/authentication.html</a></p>

<p>But in my case I want LayoutComponent as HOC (and it's without graphQL Query).</p>

<p>Here is my component :</p>

<pre><code>import React, {Component} from 'react';
import { withApollo, graphql } from 'react-apollo';
import { ApolloClient } from 'apollo-client';

import AppBar from 'material-ui/AppBar';
import Sidebar from 'Sidebar/Sidebar';
import RightMenu from 'RightMenu/RightMenu';

class Layout extends Component {
constructor(props) {
    super(props);        
}

logout = () =&gt; {
    client.resetStore();
    alert("YOUHOU");
}

render() {
    return (
        &lt;div&gt;
            &lt;AppBar title="myApp" iconElementRight={&lt;RightMenu onDisconnect={ this.logout() } /&gt;} /&gt;
        &lt;/div&gt;
    );
}
}

export default withApollo(Layout);
</code></pre>

<p>The issue here is that 'client' is not defined and I can't logout properly. 
Do you have any idea to help me to handle this situation or an example/best practices to logout from apollo client ?</p>

<p>Thanks by advance</p>
