All files / lib/src ApolloConsumer.js

100% Statements 6/6
100% Branches 0/0
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14  27x 27x 7x 5x   27x     27x        
import * as PropTypes from 'prop-types';
var invariant = require('invariant');
var ApolloConsumer = function (props, context) {
    invariant(!!context.client, "Could not find \"client\" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>");
    return props.children(context.client);
};
ApolloConsumer.contextTypes = {
    client: PropTypes.object.isRequired,
};
ApolloConsumer.propTypes = {
    children: PropTypes.func.isRequired,
};
export default ApolloConsumer;
//# sourceMappingURL=ApolloConsumer.js.map