From a3a8f29a6cd919f2059f87323198e93a38994dd6 Mon Sep 17 00:00:00 2001 From: Mauri <11723245+developermau@users.noreply.github.com> Date: Tue, 17 Feb 2026 22:11:21 -0400 Subject: [PATCH] Refactor userWithPosts and userPersonalData definitions Removed unnecessary object syntax from userWithPosts and userPersonalData definitions. --- .../operating-against-partial-structures-of-model-types.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/docs/content/docs/orm/prisma-client/type-safety/operating-against-partial-structures-of-model-types.mdx b/apps/docs/content/docs/orm/prisma-client/type-safety/operating-against-partial-structures-of-model-types.mdx index ad1fd1a47c..d22cf33b37 100644 --- a/apps/docs/content/docs/orm/prisma-client/type-safety/operating-against-partial-structures-of-model-types.mdx +++ b/apps/docs/content/docs/orm/prisma-client/type-safety/operating-against-partial-structures-of-model-types.mdx @@ -76,13 +76,9 @@ import { Prisma } from "@prisma/client"; // 1: Define a type that includes the relation to `Post` const userWithPosts = { include: { posts: true } } satisfies Prisma.UserDefaultArgs; - include: { posts: true }, -}); // 2: Define a type that only contains a subset of the scalar fields const userPersonalData = { select: { email: true, name: true } } satisfies Prisma.UserDefaultArgs; - select: { email: true, name: true }, -}); // 3: This type will include a user and all their posts type UserWithPosts = Prisma.UserGetPayload;