When specifying the generated document when submitting a query with urql in rsc, an error occurs: createContext only works in client components. occurs #9751
Unanswered
shunkominato
asked this question in
Q&A
Replies: 0 comments
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.
-
Hi thank you for the great library
I'm having a strange problem and would like to consult with you.
Sorry if there is a similar issue or discussion.
If you still need to file an issue, I will create one.
problem
When using documentation generated by the GraphQL Code Generator when issuing a query using urql in rsc under the app router, I get an
error: createContext only works in client components. To use this, add the "use client"
directive at the top of the file to use it.` occurs.Strangely, it works fine when I use the documentation written directly in the component instead of the generated documentation.
The generated content seems fine.
Of course, I am not using automatically generated hooks because of rsc.
The generated documentation is here
The repository and relevant parts are here.
I would like to use the generated document, but is there any way to do so?
version
codegen.yml
Beta Was this translation helpful? Give feedback.
All reactions