Has anyone got the react query go to definition working? #822
Replies: 2 comments 4 replies
-
This is a known limitation: 'go to definition' doesn't work with rqApiClient because createORPCReactQueryUtils builds the client using JavaScript's Proxy and dynamic property access, which TypeScript and most IDEs can't statically analyze for navigation features like 'go to definition'—property resolution happens at runtime, not compile time. This trade-off enables deep type inference and flexible APIs, but breaks static navigation. There aren't any documented workarounds or plugins to restore this; if 'go to definition' is critical, using the base rpcClient directly is the only reliable way to get that feature back. More details on the design and its trade-offs are discussed here and the implementation can be seen here. If you have a specific workflow in mind, I can help brainstorm alternatives! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
It should work, can you help me create a minimal repro? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to have go to definition enabled?
I have a react query orpc client set up, but clicking on
todos
orcreate
in therqApiClient
brings me to therqApiClient
itself instead of the place where thecreate
function was created.has anyone been able to work around this?
using the
rpcClient
directly works fine, but using therqApiClient
doesn'tBeta Was this translation helpful? Give feedback.
All reactions