title: Access root state from module getters in vuex
body: <p>I have root state which contains auth data from nuxt/auth..</p>
  
  <p>Inside store/modules/messages/ I have also state and getters etc..</p>
  
  <p>Inside getters I need to get auth data from root state but I dont know how..</p>
  
  <p>I tried adding rootState to index.js from module:</p>
  
  <pre><code>import state from './state'
  import rootState from '../../state'
  import * as actions from './actions'
  import * as mutations from './mutations'
  import * as getters from './getters'
  
  export default {
    namespaced: true,
    state,
    rootState,
    getters,
    mutations,
    actions
  }
  
  export const avatar = (rootState) =&gt; rootState.auth.user.avatar
  </code></pre>
  
  <p>But this still returns module state..</p>