KimblisK
tRPC2y ago
4 replies
Kimblis

New versions doesn't fit the docs?

I just updated versions of my packages and now I get typescript errors that the my query doesn't fit with the types. It says that I'm missing initialData and queryKey for .useQuery() however docs says that the queryKey should be auto generated. No?
My package versions:
 "@tanstack/react-query": "^5.45.1",
 "@trpc/react-query": "10.45.2",


Query example:
 const { data: exercisesCountByDifficulty, isLoading: exercisesCountByDifficultyAreBeingLoaded } =
    trpc.dashboard.getStationExercisesCountByDifficulties.useQuery(
      {
        stationIds,
      },
      {
        refetchOnMount: false,
        refetchOnReconnect: false,
        refetchOnWindowFocus: false,
        trpc: {
          context: { skipBatch: true },
        },
      },
    );


```
Was this page helpful?