Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created July 19, 2017 03:19
Show Gist options
  • Save jbaxleyiii/f121bedecf05fc90465ea47c749e2b16 to your computer and use it in GitHub Desktop.
Save jbaxleyiii/f121bedecf05fc90465ea47c749e2b16 to your computer and use it in GitHub Desktop.
+ import { QueryProps } from "react-apollo";
+ export type Props = Response & QueryProps;
+ export const withCharacter = graphql<Response, InputProps, Props>(HERO_QUERY, {
- export const withCharacter = graphql<Response, InputProps>(HERO_QUERY, {
options: ({ episode }) => ({
variables: { episode },
}),
+ props: ({ data }) => ({ ...data }),
});
+ export default withCharacter(({ loading, hero, error }) => {
- export default withCharacter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment