Skip to content

Commit 82d72d8

Browse files
committed
test: Suppress debug errors
1 parent e5e2fd5 commit 82d72d8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

example/dummy/dummy.resolver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ export class DummyResolver {
5050

5151
Object.assign(dummy, { id: '1', date: new Date() }, data);
5252
if (data.decimals) {
53+
// @ts-ignore
5354
dummy.decimals = data.decimals.set;
5455
}
5556

5657
dummy.id = `decimal_ctor_${
5758
(dummy.decimal as any)?.['constructor']?.name
59+
// @ts-ignore
5860
}, decimals: ${data.decimals?.set?.map(d => d.constructor.name)}`;
5961

6062
return dummy;

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ model Dummy {
121121
int Int?
122122
float Float?
123123
bytes Bytes?
124-
decimal Decimal?
124+
decimal Decimal // Keep as required (for compatibility check)
125125
decimals Decimal[]
126126
bigInt BigInt?
127127
json Json?

src/test/compatibility.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as P from '@prisma/client';
55
import { Dummy } from '../../@generated/dummy/dummy.model';
66
import { DummyCreateInput } from '../../@generated/dummy/dummy-create.input';
77
import { DateTimeFilter } from '../../@generated/prisma/date-time-filter.input';
8-
import { DecimalNullableFilter } from '../../@generated/prisma/decimal-nullable-filter.input';
8+
import { DecimalFilter } from '../../@generated/prisma/decimal-filter.input';
99
import { IntFilter } from '../../@generated/prisma/int-filter.input';
1010
import { StringFilter } from '../../@generated/prisma/string-filter.input';
1111
import { FindManyUserArgs } from '../../@generated/user/find-many-user.args';
@@ -56,8 +56,7 @@ let $prisma = new PrismaClient();
5656
p;
5757
}
5858
{
59-
// Nullable filter
60-
let x: DecimalNullableFilter = {};
59+
let x: DecimalFilter = {};
6160
let p: Prisma.DecimalNullableFilter = {};
6261
p = x;
6362
p;
@@ -123,8 +122,8 @@ let $prisma = new PrismaClient();
123122
x;
124123
}
125124
{
126-
let x: DummyCreateInput = { id: '1' };
127-
let p: Prisma.DummyCreateInput = { id: '2' };
125+
let x: DummyCreateInput = { id: '1', decimal: 0 as any };
126+
let p: Prisma.DummyCreateInput = { id: '2', decimal: 0 as any };
128127
p = x;
129128
p;
130129
x;

0 commit comments

Comments
 (0)