Prisma replaces traditional ORMs

Simplified & type-safe database access
Declarative migrations & data modeling
Powerful & visual data management
Get Started
View Prisma on Github
11,042

Basic Reads

1
2
3
4
5
6
7
8
9
10
11
// Retrieve all users
const allUsers: User[] = await prisma.users()

// Retrieve a single user by email
const bob: User = await prisma
  .users({ email: "bob@prisma.io" })

// Retrieve all comments of a post in a single request
const commentsOfPost: Comment[] = await prisma
  .post({ id: "cjl4srkaqqxa30b46pqcyzpyo" })
  .comments()
Supported
Coming Soon
Access

Auto-generated and type-safe database client

Prisma client simplifies database access. It lets you read and write data to your database using your favorite programming language.

  • Auto-generated & type-safe client library
  • Latest ES7 features (e.g. async/await)
  • Performant database access
Prisma Client
prisma.createUser({ 
  email: "alice@prisma.io", 
  posts: { 
    create: { 
      title: "Join us for Prisma Day 2019" 
    } 
  }
})
BEGIN;
INSERT INTO User (id, email)
  VALUES (
    "cjl4srkaqqxa30b46pqcyzpyo",
    "alice@prisma.io"
  );
INSERT INTO Post (id, title)
  VALUES (
    "cjl4srkaqqxa30b46pqcyzpyo",
    "Join us for Prisma Day 2019"
  );
INSERT INTO PostToUser (userId, postId)
  VALUES (
    "cjl4srkaqqxa30b46pqcyzpyo",
    "cjl4srkaqqxa30b46pqcyzpyo"
  )
COMMIT;

Data Access Features

Seamless JOIN & Relation API
Raw Database Access
Powerful Filter API
Supports SQL & NoSQL DBs
Declarative Nested Writes
Transactions
Realtime Event System
Connection Pooling
Advanced Pagination
Migrate

Simple data modeling & easy migrations

Prisma Migrate defines and updates your database schema using the declarative SDL syntax for data modeling and migrations.

Prisma Migrate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
type User {
  id: ID! @id
  email: String! @unique
  accessRole: AccessRole! @default(value: USER)
  posts: [Post!]!
}

type Post {
  id: ID! @id
  createdAt: DateTime! @createdAt
  title: String!
  published: Boolean! @default(value: false)
  author: User!
}
Manage

Beautiful data management workflows

Prisma Admin is a beautiful data management tool that lets you view and edit data with the ease of a spreadsheet.

Prisma Admin

How Prisma fits into your stack

Building a GraphQL server with Prisma

Prisma makes it easy to implement GraphQL servers. Learn how to use the Prisma client to access your database inside your resolvers.

  • Solves N+1 Problem with built-in dataloader
  • No boilerplate for CRUD, filters, pagination & more
  • Easily implement GraphQL subscriptions
  • Learn More

    Example GraphQL API server

    Get started with a practical example and explore how Prisma is used to build production-ready GraphQL servers.

    How Prisma works

    1

    Connect Database

    Set up Prisma by connecting your database.

    Read more
    2
    prisma
    introspect

    Introspect Schema

    Prisma analyses your database schema and generates a datamodel.

    Read more
    3
    prisma
    generate

    Generate Client

    Generate the Prisma client for your preferred programming language.

    Read more

    Start Building

    Use the generated client to build your app.

    The future of Prisma

    Focus on creating value instead of managing complex database workflows.

    Databases are at the core of every application. Yet, database access, migrations and data management workflows still are huge time sinks for developers. Our mission is to build the right abstractions and tools to save development time that should be spent on building valued-adding features.

    Any language & Any database

    The goal of Prisma is to provide a database-agnostic abstraction to be used from any programming language.

    Cross database operations

    The Prisma API will be able to abstract multiple databases at once, enabling cross database operations (e.g. JOINs).

    High-performance data layer

    Being the data layer in your app, Prisma will be able to make lots of smart decisions about how data should be accessed.