Intended outcome:
If add a any method except render() typescript begins to resent
Actual outcome:
Only render() method
With any method

And error occurs when render method return type only JSX.Element with out "false"

React works normally in all cases
How to reproduce the issue:
Repair typescript types
Version
I came across this as well.
It appears to be a limitation in how TypeScript handles "contextual types": https://github.com/Microsoft/TypeScript/issues/19212
For anyone else running into this, here's a workaound:
I've redefined the graphql decorator with the return type as any. It simply invokes the original graphql decorator.
import {graphql as __graphql, OperationOption} from 'react-apollo';
export function graphql<TProps, TResult>(gqlQuery, operationOptions?: OperationOption<TProps, TResult>): any {
return __graphql(gqlQuery, operationOptions);
}
Import the @graphql decorator you defined and the TS compiler will no longer complain about the render() method having an incompatible type.
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo!
This issue has been automatically closed because it has not had recent activity after being marked as no recent activyt. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to React Apollo!
Most helpful comment
For anyone else running into this, here's a workaound:
I've redefined the
graphqldecorator with the return type asany. It simply invokes the original graphql decorator.Import the
@graphqldecorator you defined and the TS compiler will no longer complain about therender()method having an incompatible type.