This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Expose `compose` method
from #194
This makes including multiple graphql
HOCs on a single component much easier. It uses the compose method from recompose.
// component
const Template = (props) => (<div></div>);
// old
import { graphql } from 'react-apollo';
const withPeople = graphql(peopleQuery, { name: 'people' });
const withShips = graphql(shipsQuery, { name: 'ships' });
const ContainerWithData = withPeople(withShips(Template));
// new
import { compose, graphql } from 'react-apollo';
const ContainerWithData = compose(
graphql(peopleQuery, { name: 'people' }),
graphql(shipsQuery, { name: 'ships' })
)(Template);