Client preset doesn't generate React hooks for Apollo Client #9563
Unanswered
wujekbogdan
asked this question in
Q&A
Replies: 2 comments 7 replies
-
Got the exact same issue today! The docs are not clear on whether it is possible to generate Apollo client hooks with the new |
Beta Was this translation helpful? Give feedback.
4 replies
-
I found a way to make the latest version of codegen work as before. It's kind of stupid but, if you just ignore client preset and transpose the config like that :
it works like a charm. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to migrate my old config to client preset
Old config:
New config:
The docs for
@graphql-codegen/typescript-react-apollo
say that:So I assumed that the
client
preset will generate React hooks, out of the box, but it doesn't work this way. Hooks are not generated even if I forcewithHooks: true
viaconfig
(even though it should betrue
by default).Beta Was this translation helpful? Give feedback.
All reactions