inferring types from tRPC array
I'm trying to understand how to correctly work with inferring types when using a tRPC query, when i get an array of objects.
Since i'm using prisma - i'm getting the types of the objects in the DB that i'm fetching, so my ucrrent solution is this;
type Question = RouterOutputs["question"]["getAll"][0];
...Prisma: filter include statement by nullable relation, exclude when null
I have the following code, being used to get a cart on a user session.
```ts
type CartType = Cart & { items: (Item & { product: Product })[] };
...
tRPC Websockets | package subpath not defined by exports
So basically I am playing around with tRPC Websockets/Subscriptions.
I am primarily using this repo as a reference -> https://github.com/trpc/examples-next-prisma-websockets-starter
I've created a server.ts which has the following contents ->...

Next.js Blog Dynamic Routes Tutorial - 404 when visiting /pages/[id]
Hi everyone,
I've started learning Next.js by following the starter blog tutorial (https://nextjs.org/learn/basics) but I'm stuck in the "Implement getStaticProps" section - I'm getting a 404 error whenever I try to visit
localhost:3000/posts/ssr-ssg or localhost:3000/posts/pre-rendering.
I've triple-checked that pages/posts/[id].js and lib/posts.js match the files in the next-learn repo (https://github.com/vercel/next-learn/blob/master/basics/dynamic-routes-step-1/), as suggested by the tutorial's troubleshooting section, but it's still not working. I'm not sure if it's an issue with getStaticPaths() or getStaticProps() in the pages/posts/[id].js file....Next's Link bundle size too heavy (70.53kb)
So, I noticed that importing Next's Link component bundle size is pretty heavy (70.53kb), so I looked for an alternative.
I found this link that talks about replacing React with Preact, but that sounds like an impactful change. Are there trade offs? Has anyone ever tried it?...
Error function trpc
Okay, so im kinda new to trpc stuff and not that familiar with that. I want to throw error on backend when Email is not unique. So when i write it like this in my router it works great, it throws that error:
```registerUser: publicProcedure .input(z.object({ email: z.string(), password: z.string() })) .mutation(async ({ input, ctx }) => { const user = await ctx.prisma.user.findUnique({...
```registerUser: publicProcedure .input(z.object({ email: z.string(), password: z.string() })) .mutation(async ({ input, ctx }) => { const user = await ctx.prisma.user.findUnique({...
T3-Turbo Installing Expo Packages Error
Hey, when I try to add packages or update packages to my expo app in create-t3-turbo it tries running random npm commands...
```
yarn add @shopify/flash-list@1.1.0 react-native@0.69.6...
Share components between Next.js and React Native?
Is it possible to share react components between Next.js and React Native?
I'm aware of Solito, but is there some other established method?...
tRPC client from swagger
I have a backend that is written using FastAPI, and it is already quite large and utilizes unique technologies. I would like to use tRPC in my create-t3-app, but I haven't been able to find a solution for generating a tRPC client from a swagger API through my research. I am unsure if this is even possible. I would greatly appreciate any help or suggestions on how to proceed.
Typing self-returning proxy
```ts
function div(){
const props = {}
function createChainable(obj: any = {}){
return new Proxy(() => obj, {...
tRPC complaining about unsafe assignment of any on mutation
Not sure what's causing this, anyone know why it would be complaining about the any type?

Prisma creating data twice
i want to check the db for a video with same id. if it exists dont post if it doesnt create a new video

Logic for breadcrumbs
I’ve created a general breadcrumbs component but wasn’t sure if each page that requires it should manually specify each breadcrumb. Seems annoying (but not that much work). Is there any way to do this in a less manual approach or am I overthinking this lol?
Image upload using prisma + trps
I am working on a project which involves uploading images using trpc and prisma,. In case you have done it before, plz link up your repo and I'll try to figure how you did it. Tried a little bit of googling, but didnt get it well
how do you change the parent branch in git?
Here is my current git graph:
```bash
main c1c2c3c4c5
|
branchA |c1c2c3__c4...
is refetching every second a bad idea?
I am creating an auction app,users fire mutation on click that writes current bid in db but in order to synchronize changes on every client I have set the query that gets that data on refetchinterval 1000,expected use case is about 50 users for around 1 hour,should I maybe do that some other way ?
_app.tsx file for other folders
I would like to implement layout-based routing in my pages directory. However, since I am using the "pages" directory in Next.js, I am looking for a way to use something similar to the "_app.tsx" file, but only for the files inside a specific folder. This would function similarly to the Remix routing style, where there is a folder, such as "panel," and a file called "__panel.tsx" that wraps the files inside the "panel" folder with a layout. How can I achieve something similar in the Next.js "pag...
Local Database for Vercel hosted api functions
Hey
wondering if its possible to use file system based local databases for Nextjs functions. Even just using node fs, or something like https://github.com/typicode/lowdb...
wondering if its possible to use file system based local databases for Nextjs functions. Even just using node fs, or something like https://github.com/typicode/lowdb...