@@ -13,19 +13,19 @@ export default function createRouter<Config extends BaseConfig>(router: RouterFa
13
13
14
14
aggregate : procedure . input ( $Schema . PostInputSchema . aggregate ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . aggregate ( input as any ) ) ) ,
15
15
16
- createMany : procedure . input ( $Schema . PostInputSchema . createMany ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . createMany ( input as any ) ) ) ,
16
+ createMany : procedure . input ( $Schema . PostInputSchema . createMany . optional ( ) ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . createMany ( input as any ) ) ) ,
17
17
18
18
create : procedure . input ( $Schema . PostInputSchema . create ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . create ( input as any ) ) ) ,
19
19
20
- deleteMany : procedure . input ( $Schema . PostInputSchema . deleteMany ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . deleteMany ( input as any ) ) ) ,
20
+ deleteMany : procedure . input ( $Schema . PostInputSchema . deleteMany . optional ( ) ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . deleteMany ( input as any ) ) ) ,
21
21
22
22
delete : procedure . input ( $Schema . PostInputSchema . delete ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . delete ( input as any ) ) ) ,
23
23
24
- findFirst : procedure . input ( $Schema . PostInputSchema . findFirst ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findFirst ( input as any ) ) ) ,
24
+ findFirst : procedure . input ( $Schema . PostInputSchema . findFirst . optional ( ) ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findFirst ( input as any ) ) ) ,
25
25
26
- findFirstOrThrow : procedure . input ( $Schema . PostInputSchema . findFirst ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findFirstOrThrow ( input as any ) ) ) ,
26
+ findFirstOrThrow : procedure . input ( $Schema . PostInputSchema . findFirst . optional ( ) ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findFirstOrThrow ( input as any ) ) ) ,
27
27
28
- findMany : procedure . input ( $Schema . PostInputSchema . findMany ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findMany ( input as any ) ) ) ,
28
+ findMany : procedure . input ( $Schema . PostInputSchema . findMany . optional ( ) ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findMany ( input as any ) ) ) ,
29
29
30
30
findUnique : procedure . input ( $Schema . PostInputSchema . findUnique ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . findUnique ( input as any ) ) ) ,
31
31
@@ -39,7 +39,7 @@ export default function createRouter<Config extends BaseConfig>(router: RouterFa
39
39
40
40
upsert : procedure . input ( $Schema . PostInputSchema . upsert ) . mutation ( async ( { ctx, input } ) => checkMutate ( db ( ctx ) . post . upsert ( input as any ) ) ) ,
41
41
42
- count : procedure . input ( $Schema . PostInputSchema . count ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . count ( input as any ) ) ) ,
42
+ count : procedure . input ( $Schema . PostInputSchema . count . optional ( ) ) . query ( ( { ctx, input } ) => checkRead ( db ( ctx ) . post . count ( input as any ) ) ) ,
43
43
44
44
}
45
45
) ;
@@ -123,14 +123,14 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
123
123
findFirst : {
124
124
125
125
useQuery : < T extends Prisma . PostFindFirstArgs , TData = Prisma . PostGetPayload < T > > (
126
- input : Prisma . SelectSubset < T , Prisma . PostFindFirstArgs > ,
126
+ input ? : Prisma . SelectSubset < T , Prisma . PostFindFirstArgs > ,
127
127
opts ?: UseTRPCQueryOptions < string , T , Prisma . PostGetPayload < T > , TData , Error >
128
128
) => UseTRPCQueryResult <
129
129
TData ,
130
130
TRPCClientErrorLike < AppRouter >
131
131
> ;
132
132
useInfiniteQuery : < T extends Prisma . PostFindFirstArgs > (
133
- input : Omit < Prisma . SelectSubset < T , Prisma . PostFindFirstArgs > , 'cursor' > ,
133
+ input ? : Omit < Prisma . SelectSubset < T , Prisma . PostFindFirstArgs > , 'cursor' > ,
134
134
opts ?: UseTRPCInfiniteQueryOptions < string , T , Prisma . PostGetPayload < T > , Error >
135
135
) => UseTRPCInfiniteQueryResult <
136
136
Prisma . PostGetPayload < T > ,
@@ -141,14 +141,14 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
141
141
findFirstOrThrow : {
142
142
143
143
useQuery : < T extends Prisma . PostFindFirstOrThrowArgs , TData = Prisma . PostGetPayload < T > > (
144
- input : Prisma . SelectSubset < T , Prisma . PostFindFirstOrThrowArgs > ,
144
+ input ? : Prisma . SelectSubset < T , Prisma . PostFindFirstOrThrowArgs > ,
145
145
opts ?: UseTRPCQueryOptions < string , T , Prisma . PostGetPayload < T > , TData , Error >
146
146
) => UseTRPCQueryResult <
147
147
TData ,
148
148
TRPCClientErrorLike < AppRouter >
149
149
> ;
150
150
useInfiniteQuery : < T extends Prisma . PostFindFirstOrThrowArgs > (
151
- input : Omit < Prisma . SelectSubset < T , Prisma . PostFindFirstOrThrowArgs > , 'cursor' > ,
151
+ input ? : Omit < Prisma . SelectSubset < T , Prisma . PostFindFirstOrThrowArgs > , 'cursor' > ,
152
152
opts ?: UseTRPCInfiniteQueryOptions < string , T , Prisma . PostGetPayload < T > , Error >
153
153
) => UseTRPCInfiniteQueryResult <
154
154
Prisma . PostGetPayload < T > ,
@@ -159,14 +159,14 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
159
159
findMany : {
160
160
161
161
useQuery : < T extends Prisma . PostFindManyArgs , TData = Array < Prisma . PostGetPayload < T > > > (
162
- input : Prisma . SelectSubset < T , Prisma . PostFindManyArgs > ,
162
+ input ? : Prisma . SelectSubset < T , Prisma . PostFindManyArgs > ,
163
163
opts ?: UseTRPCQueryOptions < string , T , Array < Prisma . PostGetPayload < T > > , TData , Error >
164
164
) => UseTRPCQueryResult <
165
165
TData ,
166
166
TRPCClientErrorLike < AppRouter >
167
167
> ;
168
168
useInfiniteQuery : < T extends Prisma . PostFindManyArgs > (
169
- input : Omit < Prisma . SelectSubset < T , Prisma . PostFindManyArgs > , 'cursor' > ,
169
+ input ? : Omit < Prisma . SelectSubset < T , Prisma . PostFindManyArgs > , 'cursor' > ,
170
170
opts ?: UseTRPCInfiniteQueryOptions < string , T , Array < Prisma . PostGetPayload < T > > , Error >
171
171
) => UseTRPCInfiniteQueryResult <
172
172
Array < Prisma . PostGetPayload < T > > ,
@@ -389,7 +389,7 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
389
389
? number
390
390
: Prisma . GetScalarType < T [ 'select' ] , Prisma . PostCountAggregateOutputType >
391
391
: number > (
392
- input : Prisma . Subset < T , Prisma . PostCountArgs > ,
392
+ input ? : Prisma . Subset < T , Prisma . PostCountArgs > ,
393
393
opts ?: UseTRPCQueryOptions < string , T , 'select' extends keyof T
394
394
? T [ 'select' ] extends true
395
395
? number
@@ -400,7 +400,7 @@ export interface ClientType<AppRouter extends AnyRouter, Context = AppRouter['_d
400
400
TRPCClientErrorLike < AppRouter >
401
401
> ;
402
402
useInfiniteQuery : < T extends Prisma . PostCountArgs > (
403
- input : Omit < Prisma . Subset < T , Prisma . PostCountArgs > , 'cursor' > ,
403
+ input ? : Omit < Prisma . Subset < T , Prisma . PostCountArgs > , 'cursor' > ,
404
404
opts ?: UseTRPCInfiniteQueryOptions < string , T , 'select' extends keyof T
405
405
? T [ 'select' ] extends true
406
406
? number
0 commit comments