Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created June 4, 2017 04:10
Show Gist options
  • Select an option

  • Save jbaxleyiii/34a146932723b3fb3d2c157ce761c68f to your computer and use it in GitHub Desktop.

Select an option

Save jbaxleyiii/34a146932723b3fb3d2c157ce761c68f to your computer and use it in GitHub Desktop.
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