Hey @andreasqlight ๐Ÿ‘‹ ,

You should be able to import any of Prisma's generated types from the @prisma/client package.

model User {
 ...
}
import type { User } from '@prisma/client'

Let me know if that works!

๐ŸŒ
Prisma
prisma.io โ€บ home โ€บ models โ€บ models โ€บ models โ€บ models
Models | Prisma Documentation
The data model definition part of the Prisma schema defines your application models (also called Prisma models). Models: ... When used with TypeScript, Prisma Client provides generated type definitions for your models and any variations of them to make database access entirely type safe.
๐ŸŒ
Prisma
prisma.io โ€บ home โ€บ fields & types โ€บ fields & types โ€บ fields & types
Fields & types | Prisma Documentation
When creating records that have fields of type DateTime, Prisma Client accepts values as Date objects adhering to the ISO 8601 standard.
Discussions

Prisma generate types without pushing changes to database - Stack Overflow
Is there any way to make Prisma to generate all the typescript types without connecting to the database? More on stackoverflow.com
๐ŸŒ stackoverflow.com
how to convert prisma schema to typescript types ?
If you run "prisma generate", you would generate all the ts interfaces based on the prisma schema. You can import those interfaces from "@prisma/client". Example: Prisma Schema: https://ibb.co/P5S53Pj Types generated automatically from the prima Schema: https://ibb.co/QrzbmX8 More on reddit.com
๐ŸŒ r/node
5
5
July 6, 2023
get full type on prisma client - Stack Overflow
When i generate my prisma client with prisma generate, i got an index.d.ts with all types from my database. But the probleme is that all type are "single" and there is no relations. When i More on stackoverflow.com
๐ŸŒ stackoverflow.com
typescript - How to add type definitions for includes in a Prisma model? - Stack Overflow
The generated types do not include relations because queries don't return relations by default. To include the related models in your type, use the provided Prisma utility types like so: More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Medium
medium.com โ€บ @jeevankc17 โ€บ understanding-typescript-types-with-prisma-e0e41a7d98f3
Understanding TypeScript Types with Prisma | by Jeevan KC | Medium
December 17, 2024 - We all know, Prisma simplifies database access, while TypeScript adds static typing to your code. When combined, they make your backendโ€ฆ
๐ŸŒ
Prisma
prisma.io โ€บ home โ€บ type safety overview โ€บ type safety overview โ€บ type safety overview
Type safety | Prisma Documentation
To help you create highly type-safe applications, Prisma Client provides a set of type utilities that tap into input and output types. These types are fully dynamic, which means that they adapt to any given model and schema.
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ prisma
prisma - npm
5 days ago - Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one.. Latest version: 7.9.0, last published: 5 days ago.
      ยป npm install prisma
    
Published ย  Jul 20, 2026
Version ย  7.9.0
Find elsewhere
๐ŸŒ
Build with Matija
buildwithmatija.com โ€บ blog โ€บ prisma-standalone-types-announcement
Introducing Prisma Standalone Types: Copy Your Database Types Anywhere | Build with Matija
September 17, 2025 - Generate dependency-free TypeScript interfaces from your Prisma schema with prisma-standalone-types. Share types across frontend, microservices.
๐ŸŒ
Prisma
prisma.io โ€บ typescript
TypeScript ORM with zero-cost type-safety for your database | Prisma
Prisma is an ORM for Node.js and TypeScript that gives you the benefits of type-safety at zero cost by auto-generating types from your database schema.
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ zod-prisma-types
zod-prisma-types - npm
January 24, 2026 - The satisfies operator: As some people have pointed out the input and output schemas and some of the relation schemas are typed as z.ZodType<myType>. This is required by zod for recursice types to work properly as stated in the docs. This has the downside that some zod methods like .merge(), .omit(), etc. are not available on these types. if you need to add rich comments to your prisma file alongside the validator string, always add the validator string last.
      ยป npm install zod-prisma-types
    
Published ย  Jan 24, 2026
Version ย  3.3.11
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ prisma-json-types-generator
prisma-json-types-generator - npm
January 26, 2026 - Flexible Typing: Define types globally in a namespace or inline directly in your schema. Multiple Client Support: Works with multiple @prisma/client generators simultaneously, perfect for refactoring scenarios where you need to support old and new locations.
      ยป npm install prisma-json-types-generator
    
Published ย  Jan 26, 2026
Version ย  4.1.1
๐ŸŒ
Prisma
prisma.io โ€บ home โ€บ how to use prisma orm's type system โ€บ how to use prisma orm's type system โ€บ how to use prisma orm's type system โ€บ how to use prisma orm's type system
How to use Prisma ORM's type system | Prisma Documentation
When you introspect an existing database, Prisma ORM will take the database type of each table column and represent it in your Prisma schema using the correct Prisma ORM type for the corresponding model field.
Top answer
1 of 10
103

An alternate method (my preferrence) to get the "full" type, or the model with all of its possible relations, is to use the GetPayload version of your model type. The type is a generic that can receive the same object you pass to your query.

import { PrismaClient, Prisma } from "@prisma/client";

const prisma = new PrismaClient();

type UserWithCars = Prisma.UserGetPayload<{
  include: {
    cars: true;
  }
}>

const usersWithCars = await prisma.user.findMany({
  include: {
    cars: true,
  }
});

As your query grows more complex, you may want to abstract it and ensure that it is strongly typed.

import { Prisma, PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

const userInclude = Prisma.validator<Prisma.UserInclude>()({
  cars: true,
});

type UserWithCars = Prisma.UserGetPayload<{
  include: typeof userInclude;
}>;

const usersWithCars = await prisma.user.findMany({
  include: userInclude,
});

2 of 10
20

You can use the Prisma Validator API along with some typescript features to generate types for your query.

For the findMany example you mentioned

import { Prisma } from '@prisma/client'

// 1. Define a User type that includes the "cars" relation. 
const userWithCars = Prisma.validator<Prisma.UserArgs>()({
    include: { cars: true },
})

// 2: This type will include many users and all their cars
type UserWithCars = Prisma.UserGetPayload<typeof userWithCars>[]

If you simply want to automatically infer the return type of a prisma query wrapped in a function, you can use PromiseReturnType.

For example:

import { Prisma } from '@prisma/client'

async function getUsersWithCars() {
  const users = await prisma.user.findMany({ include: { cars: true } });
  return users;
}

type UsersWithCars = Prisma.PromiseReturnType<typeof getUsersWithCars>

You can read more about this in the Operating against partial structures of your model types concept guide in the Prisma docs.

๐ŸŒ
Typegraphql
prisma.typegraphql.com
Home page | TypeGraphQL Prisma
Prisma generator to emit TypeGraphQL type classes and CRUD resolvers from your Prisma schema
๐ŸŒ
NestJS
docs.nestjs.com โ€บ recipes โ€บ prisma
Prisma | NestJS - A progressive Node.js framework
To install Prisma Client in your project, run the following command in your terminal: ... Once installed, you can run the generate command to generate the types and Client needed for your project.