Created
June 4, 2017 04:10
-
-
Save jbaxleyiii/34a146932723b3fb3d2c157ce761c68f 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
| export const withCharacter: OperationComponent<Response, InputProps Props> = graphql(HERO_QUERY, { | |
| options: ({ episode }) => ({ | |
| variables: { episode }, | |
| }), | |
| props: ({ data, ownProps }) => ({ | |
| ...data, | |
| // $ExpectError [string] This type cannot be compared to number | |
| episode: ownProps.episode > 1, | |
| // $ExpectError property `isHero`. Property not found on object type | |
| isHero: data && data.hero && data.hero.isHero, | |
| }), | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment