Skip to content

bug: [Docs] Next.js Integration documentation references deprecated prefetch functions #7596

Description

@ioExpander

Provide environment information

  System:
    OS: Linux 6.12 Debian GNU/Linux 13 (trixie) 13 (trixie)
    CPU: (14) x64 AMD Ryzen 7 255 w/ Radeon 780M Graphics
    Memory: 26.74 GB / 30.51 GB
    Container: Yes
    Shell: 5.2.37 - /bin/bash
  Binaries:
    Node: 24.14.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 11.9.0 - /usr/local/bin/npm
    pnpm: 11.6.0 - /usr/local/share/npm-global/bin/pnpm
  npmPackages:
    typescript: ^7.0.2 => 7.0.2 

Describe the bug

The NextJS integration docs reference some deprecated prefecth methods : queryClient.prefetchInfiniteQuery(queryOptions as any) and queryClient.prefetchQuery(queryOptions)
It seems that these methods are now deprecated in Tanstack/Query. Is it still safe to use as is ? Or should I replace calls with .query() ?

Thank you.

Link to reproduction

https://trpc.io/docs/client/nextjs/app-router-setup#7-make-api-requests

To reproduce

N/A

Additional information

No response

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR fixing this bug!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions