document.write("
import { ChildProps } from "react-apollo"; const withCharacter = graphql<Response, InputProps>(HERO_QUERY, { options: ({ episode }) => ({ variables: { episode } }) }); class Character extends React.Component<ChildProps<InputProps, Response>, {}> { render(){ const { loading, hero, error } = this.props.data; if (loading) return <div>Loading</div>; if (error) return <h1>ERROR</h1>; return ...// actual component with data; } } export default withCharacter(Character);