Skip to content

Commit

Permalink
Enable fluent API to findFirstOrThrow and findUniqueOrThrow
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Nov 8, 2022
1 parent 1b94869 commit 7c7a3f6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/client/src/runtime/core/model/applyModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ export type ModelAction = (
paramOverrides: O.Optional<InternalRequestParams>,
) => (userArgs?: UserArgs) => PrismaPromise<unknown>

const fluentProps = ['findUnique', 'findFirst', 'create', 'update', 'upsert', 'delete'] as const
const fluentProps = [
'findUnique',
'findUniqueOrThrow',
'findFirst',
'findFirstOrThrow',
'create',
'update',
'upsert',
'delete',
] as const
const aggregateProps = ['aggregate', 'count', 'groupBy'] as const

/**
Expand Down

0 comments on commit 7c7a3f6

Please sign in to comment.