0.0.4 • Published 2 years ago

prisma-selections v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Prisma Selections

Prisma selections allow you to define "select aliases", so instead of writing:

const user = await prisma.user.findUnique({
  select: {
    id: true,
    fullName: true,
    username: true,
    avatarUrl: true,
    // ...
  }
})

You can write this instead:

const user = await prisma.user.findUnique({
  select: selections.user({
    $profileData: true,
    // ...
  })
})

And fully leverage the powerful intellisense provided by Prisma's TypeScript types!

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago