Skip to content
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

In React Example: With Trpc React Query the output type infer doesn't work #3057

Open
michaltaberski opened this issue Dec 23, 2024 · 1 comment

Comments

@michaltaberski
Copy link

Which project does this relate to?

Router

Describe the bug

Using trpc together with react-query in the context of react router is making the procedure output type to infer to any. The issue is visible in TanStack/Router example code.

Your Example Website or App

https://tanstack.com/router/latest/docs/framework/react/examples/with-trpc-react-query

Steps to Reproduce the Bug or Issue

  1. Go to React Example: With Trpc React Query
  2. Open dashboard.index.tsx file
  3. Check notation of the posts object. It doesn't infer output type from the trcp prodecure:
    Image

Aside notes:

I am experiencing the same issue and at first I thought it's my fault, but after a bit of exploring I know it's a common issue. For reference, I have asked for a help with that issue a while ago on trpc repo: trpc/trpc#6314.

Expected behavior

The procedure output type should be inffered from trpc.

Screenshots or Videos

No response

Platform

  • Browser: Arc
  • Version: Any

Additional context

No response

@schiller-manuel
Copy link
Contributor

seems to be a TRPC issue and not router related, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants