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
Allow for specifying variables as a generics argument in graphql TypeScript declaration for react #2198
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Apollo Client! |
@dyst5422 do you have any interesting in adding this? |
I'll take a stab this week after I fix this one bug.... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Apollo Client! |
This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Apollo Client! |
Would still like to see this get merged in. |
@dyst5422 I'll reopen and see if anyone can help add this! |
I already opened a pull request for this one. I'm not sure if it's still compatible with V2 |
@dyst5422 I'm not sure if it is either! I'm going to create an umbrella issue for typescript / type improvements to see about organizing towards a shared goal of better types (flow, improved depth of typings, etc) |
Thats a good idea. I'll look into whether my PR on V1 is compatible with V2 (just upgraded yesterday, and I didn't have to touch my HOC's at all, so that's good news). |
This was addressed in apollographql/react-apollo#1365. Closing - thanks! |
There are times when a query requires variables that are not useful to the underlying component. Currently, if I specify variables as part of the props the graphql function will receive, my component must also accept those variables.
This should be a relatively simple addition to the declaration to have an extra generic that is variables types defaulted to
{}
that gets merged into the returned react component type. Though as we all know, a seemingly simple change to types often causes a litany of other type headaches.The text was updated successfully, but these errors were encountered: