Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[typescript-react-apollo] Add missing lazy query hooks result type #2486

Conversation

waynelai614
Copy link
Contributor

@waynelai614 waynelai614 commented Sep 3, 2019

Related to #2133 & #2309

As title, add missing result type for lazy query hooks

e.g. dev-test/githunt/types.reactApollo.hooks.tsx

export function useCommentQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<CommentQuery, CommentQueryVariables>) {
  return ApolloReactHooks.useQuery<CommentQuery, CommentQueryVariables>(CommentDocument, baseOptions);
}
export function useCommentLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<CommentQuery, CommentQueryVariables>) {
  return ApolloReactHooks.useLazyQuery<CommentQuery, CommentQueryVariables>(CommentDocument, baseOptions);
}
export type CommentQueryHookResult = ReturnType<typeof useCommentQuery>;
+ export type CommentLazyQueryHookResult = ReturnType<typeof useCommentLazyQuery>;

@waynelai614 waynelai614 changed the title Add missing lazy query hooks result type [typescript-react-apollo] Add missing lazy query hooks result type Sep 3, 2019
@ardatan
Copy link
Collaborator

ardatan commented Sep 3, 2019

Thank you @waynelai614 !

@ardatan ardatan closed this Sep 3, 2019
@ardatan ardatan reopened this Sep 3, 2019
@ardatan ardatan merged commit 764d1eb into dotansimha:master Sep 3, 2019
@waynelai614 waynelai614 deleted the feature/add-missing-lazy-query-hooks-result-type branch September 5, 2019 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants