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
{{ message }}
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
GraphQL codegen
is an extremely popular alternative to Apollo client's native codegen capability.
It reads graphql snippets in the source code (eg can be embedded graphql queries in tsx files) and outputs something (like a custom hook for making the query using Apollo), in our case I imagine we would be targeting typescript react hooks for RTK-query
Yup, I've already dabbled a bit with their code generation in a work project and it's pretty manageable.
This is definitely on the todo list, but it will need #52 to be done - and together with #52, I'd like to first tackle generation of clients from OpenAPI schemas, as I feel the "need" of the ecosystem is bigger there.
GraphQL codegen already does a good job for a couple of packages and while it's very cool to support it, it already supports quite a lot great tools - while for REST code generation, AFAIK there is less good choice.
If you want to take a go on this before I get to it though, feel free :)
I'm closing everything here now. If there's any need for further discussion, that should take place in a new issue over at https://github.com/reduxjs/redux-toolkit/
That said: of course a contribution in the form of such a plugin will be very welcome
GraphQL codegen
is an extremely popular alternative to Apollo client's native codegen capability.
It reads graphql snippets in the source code (eg can be embedded graphql queries in tsx files) and outputs something (like a custom hook for making the query using Apollo), in our case I imagine we would be targeting typescript react hooks for RTK-query
It has a plugin-in system that allows various tools to build their own plugins. here is an example of gql typescript plugin for react-query:
https://graphql-code-generator.com/docs/plugins/typescript-react-query
The text was updated successfully, but these errors were encountered: