Satou kuzuma
Explore posts from serversuseInfiniteQuery does not exist on appRouter t3-Stack Prisma
I'm using appRouter and trying to do pagination with useInfiniteQuery() but i've got the next typescript error:
Property 'useInfiniteQuery' does not exist on type '{ query: Resolver<BuildProcedure<"query", { _config: RootConfig<{ ctx: { headers: Headers; db: PrismaClient<{ log: ("query" | "warn" | "error")[]; }, never, DefaultArgs>; session: Session | null; }; meta: object; errorShape: { ...; }; transformer: typeof SuperJSON; }>; ... 5 more ...; _output_out: unique symbol; }
and I can't find anything about it.
This is my code
and on the server
1 replies
Websocket connection failed.
I'm following the websocket's example and it works fine as it is, however I changed some things and it seems i broke it. The problem is located in the getinitialprops function in _myapp.tsx.
The thing is I don't want to use authentication and so I don't need to return session as pageprops in the getInitialProps function so I tried returning an empty object but it gives me an error saying failed to connect to 'ws://localhost:3001/'. I should return something as pageProps so the problem goes away but I don't know what and I couldn't find anything in nextjs documentation.
I'm not sure if this is related to tRPC and I'm not smart enough to solve it myself so if you have some idea what it's happening I'd appreciate the help. Thank you!
14 replies