Bug description
When I have really simple model:
model Post {
uuid String @default(uuid()) @id
title String
metadata Json
}
For filter input types, for fields of type Json, it emits JsonFilter object type as field input type:
{
"name": "PostScalarWhereInput",
"fields": [
{
"name": "title",
"inputType": [
{
"isList": false,
"isRequired": false,
"kind": "scalar",
"type": "String"
},
{
"type": "StringFilter",
"isList": false,
"isRequired": false,
"kind": "object"
}
],
"isRelationFilter": false
},
{
"name": "metadata",
"inputType": [
{
"isList": false,
"isRequired": false,
"kind": "scalar",
"type": "Json"
},
{
"type": "JsonFilter",
"isList": false,
"isRequired": false,
"kind": "object"
}
],
"isRelationFilter": false
}
],
"isWhereType": true,
"atLeastOne": false
}
But the generated JsonFilter type has no fields which results in empty input type class generated by TypeGraphQL integration:
{
"name": "JsonFilter",
"fields": [],
"atLeastOne": false
}
Environment & setup
- OS: [e.g. Mac OS, Windows, Debian, CentOS, ...] Windows 10 x64
- Database: [PostgreSQL, MySQL, MariaDB or SQLite] Postgres
- Prisma version: [Run
prisma -v to see your Prisma version] 2.0.0-beta.5
- Node.js version: [Run
node -v to see your Node.js version] 13.12
@prisma/cli : 2.0.0-beta.5
Current platform : windows
Query Engine : query-engine 0c2ec197653b278b2978845ef958db88824cd82e (at D:\#Projekty\typegraphql-prisma\experiments\node_modules\@prisma\cli\query-engine-windows.exe)
Migration Engine : migration-engine-cli 0c2ec197653b278b2978845ef958db88824cd82e (at D:\#Projekty\typegraphql-prisma\experiments\node_modules\@prisma\cli\migration-engine-windows.exe)
Introspection Engine : introspection-core 0c2ec197653b278b2978845ef958db88824cd82e (at D:\#Projekty\typegraphql-prisma\experiments\node_modules\@prisma\cli\introspection-engine-windows.exe)
Format Binary : prisma-fmt 0c2ec197653b278b2978845ef958db88824cd82e (at D:\#Projekty\typegraphql-prisma\experiments\node_modules\@prisma\cli\prisma-fmt-windows.exe)
Bug description
When I have really simple model:
For filter input types, for fields of type
Json, it emitsJsonFilterobject type as field input type:{ "name": "PostScalarWhereInput", "fields": [ { "name": "title", "inputType": [ { "isList": false, "isRequired": false, "kind": "scalar", "type": "String" }, { "type": "StringFilter", "isList": false, "isRequired": false, "kind": "object" } ], "isRelationFilter": false }, { "name": "metadata", "inputType": [ { "isList": false, "isRequired": false, "kind": "scalar", "type": "Json" }, { "type": "JsonFilter", "isList": false, "isRequired": false, "kind": "object" } ], "isRelationFilter": false } ], "isWhereType": true, "atLeastOne": false }But the generated
JsonFiltertype has nofieldswhich results in empty input type class generated by TypeGraphQL integration:{ "name": "JsonFilter", "fields": [], "atLeastOne": false }Environment & setup
prisma -vto see your Prisma version] 2.0.0-beta.5node -vto see your Node.js version] 13.12