Created
June 4, 2017 04:08
-
-
Save jbaxleyiii/7a9d3d5abe2a0654fca8b224d3797f2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ import type { OperationComponent, QueryProps } from "react-apollo"; | |
- import type { OperationComponent } from "react-apollo"; | |
+ export type Props = Response & QueryProps; | |
+ export const withCharacter: OperationComponent<Response, InputProps, Props> = graphql(HERO_QUERY, { | |
- export const withCharacter: OperationComponent<Response, InputProps> = graphql(HERO_QUERY, { | |
options: ({ episode }) => ({ | |
variables: { episode }, | |
}), | |
+ props: ({ data }) => ({ ...data }), | |
}); | |
+ export default withCharacter(({ loading, hero, error }) => { | |
- export default withCharacter(({ data: { loading, hero, error } }) => { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment