You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As a result of #2116, using operationResultSuffix leads to generation of wrong React Apollo component prop type names. They are not updated, but operation result type name is generated correctly.
To Reproduce
Specify operationResultSuffix in config.yml (e.g. "Response"), when using typescript-react-apollo plugin.
Generate output.
Check the generated file and make sure that TData in generated ReactApollo.DataProps<TData, TGraphQLVariables> has a wrong type name. E.g. MyOperationQuery instead of MyOperationQueryResponse.
Expected behavior
Component prop type names are updated too when operationResultSuffix is used.
Environment:
Any
Additional context
This is my mistake and I will fix in a PR.
The text was updated successfully, but these errors were encountered:
jlkiri
changed the title
Wrong prop type names when using typescript-react-apollo with custom operation result type names
Wrong component prop type names when using typescript-react-apollo
Jul 12, 2019
I did some tests and it looks like only generated React Apollo HOC props are affected by the change. The only current workaround is to set withHOC to false.
This is a pretty easy fix, I'll send a PR.
Describe the bug
As a result of #2116, using
operationResultSuffix
leads to generation of wrong React Apollo component prop type names. They are not updated, but operation result type name is generated correctly.To Reproduce
operationResultSuffix
inconfig.yml
(e.g."Response"
), when usingtypescript-react-apollo
plugin.TData
in generatedReactApollo.DataProps<TData, TGraphQLVariables>
has a wrong type name. E.g.MyOperationQuery
instead ofMyOperationQueryResponse
.Expected behavior
Component prop type names are updated too when
operationResultSuffix
is used.Environment:
Any
Additional context
This is my mistake and I will fix in a PR.
The text was updated successfully, but these errors were encountered: