Skip to content

Commit

Permalink
When using upsert the @default(auth().field) is not been handled
Browse files Browse the repository at this point in the history
  • Loading branch information
israelins85 authored May 3, 2024
1 parent 96390fd commit c2a1f70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/runtime/src/enhancements/default-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ class DefaultAuthHandler extends DefaultPrismaProxyHandler {
processCreatePayload(model, data);
},

upsert: (model, data) => {
processCreatePayload(model, data.create);
},

createMany: (model, args) => {
for (const item of enumerate(args.data)) {
processCreatePayload(model, item);
Expand Down

0 comments on commit c2a1f70

Please sign in to comment.