title: Can I use HOC to wrap component with graphql and redux
body: <p>I have plenty of template components, they resemble each other in way they are used.
  Before being rendered to page, template components get wrapped in graphql and connected to redux.
  I want to create a HOC to wrap my templates, so that I do not create a new container each time to connect template to data.
  Like so:</p>
  
  <p>Here is my page component, where I try to wrap the <strong>AppointmentsListTemplate</strong> template with <strong>gqlList</strong> HOC:</p>
  
  <pre><code>import React from 'react'
  import { AdminTemplate, AppointmentsListTemplate } from 'components'
  import { gqlList } from 'containers'
  import {qyListAppointments} from 'services/gqlQueries/Appointments'
  
  const AppointmentsListTemplateWrapped = gqlList(AppointmentsListTemplate, qyListAppointments)
  
  const AdminAppointmentsPage = (props) =&gt; {
      return (
          &lt;AdminTemplate&gt;
              &lt;AppointmentsListTemplateWrapped /&gt;
          &lt;/AdminTemplate&gt;
      )
  }
  
  export default AdminAppointmentsPage
  </code></pre>
  
  <p>And here is my gqlList HOC:</p>
  
  <pre><code>import React, {Component} from 'react'
  import { graphql } from 'react-apollo'
  import { connect } from 'react-redux'
  import { saveQueryVars } from 'store/helper/actions'
  
  const gqlList = (WrappedComponent, gqlQuery) =&gt; {
  
    const GQL = graphql(gqlQuery)(WrappedComponent)
    return connect(null, {
      saveQueryVars,
    })(GQL)
  }
  export default gqlList
  </code></pre>
  
  <p>But graphql connector part throws me this error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'displayName' of undefined
        at getDisplayName (react-apollo.browser.umd.js:250)
        at wrapWithApolloComponent (react-apollo.browser.umd.js:266)
        at new eval (gqlList.js:22)
        at eval (createClassProxy.js:95)
        at instantiate (createClassProxy.js:103)
        at Unknown (eval at proxyClass (createClassProxy.js:NaN), :4:17)
        at eval (ReactCompositeComponent.js:303)
        at measureLifeCyclePerf (ReactCompositeComponent.js:73)
        at ReactCompositeComponentWrapper._constructComponentWithoutOwner</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>