Хорошо, я обнаружил, что могу импортировать ApolloContext
из react-apollo
, чтобы решить, как показано ниже:
import { ApolloContext } from 'react-apollo';
const HomeContainer = (props: HomeProps) => {
const context = useContext(ApolloContext);
return <Home {...props} />;
}