Skip to content

Commit 066b947

Browse files
committed
use latest prisma for trpc tests
1 parent dfc175a commit 066b947

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

packages/plugins/trpc/tests/projects/t3-trpc-v10/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"start": "next start"
1414
},
1515
"dependencies": {
16-
"@prisma/client": "^5.6.0",
16+
"@prisma/client": "5.12.0",
1717
"@t3-oss/env-nextjs": "^0.7.1",
1818
"@tanstack/react-query": "^4.36.1",
1919
"@trpc/client": "^10.43.6",
@@ -35,7 +35,7 @@
3535
"@typescript-eslint/parser": "^6.11.0",
3636
"eslint": "^8.54.0",
3737
"eslint-config-next": "^14.0.4",
38-
"prisma": "^5.6.0",
38+
"prisma": "5.12.0",
3939
"typescript": "^5.1.6"
4040
},
4141
"ct3aMetadata": {

packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/Post.router.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export default function createRouter<Config extends BaseConfig>(router: RouterFa
1212

1313
aggregate: procedure.input($Schema.PostInputSchema.aggregate).query(({ ctx, input }) => checkRead(db(ctx).post.aggregate(input as any))),
1414

15+
createMany: procedure.input($Schema.PostInputSchema.createMany).mutation(async ({ ctx, input }) => checkMutate(db(ctx).post.createMany(input as any))),
16+
1517
create: procedure.input($Schema.PostInputSchema.create).mutation(async ({ ctx, input }) => checkMutate(db(ctx).post.create(input as any))),
1618

1719
deleteMany: procedure.input($Schema.PostInputSchema.deleteMany).mutation(async ({ ctx, input }) => checkMutate(db(ctx).post.deleteMany(input as any))),
@@ -60,6 +62,20 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
6062
TRPCClientErrorLike<AppRouter>
6163
>;
6264

65+
};
66+
createMany: {
67+
68+
useMutation: <T extends Prisma.PostCreateManyArgs>(opts?: UseTRPCMutationOptions<
69+
Prisma.PostCreateManyArgs,
70+
TRPCClientErrorLike<AppRouter>,
71+
Prisma.BatchPayload,
72+
Context
73+
>,) =>
74+
Omit<UseTRPCMutationResult<Prisma.BatchPayload, TRPCClientErrorLike<AppRouter>, Prisma.SelectSubset<T, Prisma.PostCreateManyArgs>, Context>, 'mutateAsync'> & {
75+
mutateAsync:
76+
<T extends Prisma.PostCreateManyArgs>(variables: T, opts?: UseTRPCMutationOptions<T, TRPCClientErrorLike<AppRouter>, Prisma.BatchPayload, Context>) => Promise<Prisma.BatchPayload>
77+
};
78+
6379
};
6480
create: {
6581

packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/User.router.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export default function createRouter<Config extends BaseConfig>(router: RouterFa
1212

1313
aggregate: procedure.input($Schema.UserInputSchema.aggregate).query(({ ctx, input }) => checkRead(db(ctx).user.aggregate(input as any))),
1414

15+
createMany: procedure.input($Schema.UserInputSchema.createMany).mutation(async ({ ctx, input }) => checkMutate(db(ctx).user.createMany(input as any))),
16+
1517
create: procedure.input($Schema.UserInputSchema.create).mutation(async ({ ctx, input }) => checkMutate(db(ctx).user.create(input as any))),
1618

1719
deleteMany: procedure.input($Schema.UserInputSchema.deleteMany).mutation(async ({ ctx, input }) => checkMutate(db(ctx).user.deleteMany(input as any))),
@@ -60,6 +62,20 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
6062
TRPCClientErrorLike<AppRouter>
6163
>;
6264

65+
};
66+
createMany: {
67+
68+
useMutation: <T extends Prisma.UserCreateManyArgs>(opts?: UseTRPCMutationOptions<
69+
Prisma.UserCreateManyArgs,
70+
TRPCClientErrorLike<AppRouter>,
71+
Prisma.BatchPayload,
72+
Context
73+
>,) =>
74+
Omit<UseTRPCMutationResult<Prisma.BatchPayload, TRPCClientErrorLike<AppRouter>, Prisma.SelectSubset<T, Prisma.UserCreateManyArgs>, Context>, 'mutateAsync'> & {
75+
mutateAsync:
76+
<T extends Prisma.UserCreateManyArgs>(variables: T, opts?: UseTRPCMutationOptions<T, TRPCClientErrorLike<AppRouter>, Prisma.BatchPayload, Context>) => Promise<Prisma.BatchPayload>
77+
};
78+
6379
};
6480
create: {
6581

0 commit comments

Comments
 (0)