Closed hbendev closed 1 year ago
I would expect the generated Input objects to have 'ID' scalar as their type instead of String - at least if they they are string types in the db, but maybe other times as well to comply the GraphQL specification.
Related docs: https://graphql.org/learn/schema/#scalar-types
Example schema file:
model User { id String @id @default(cuid()) @db.VarChar(30) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt isAdmin Boolean @default(false) email String @unique }
Actual output:
export const UserWhereUniqueInputFields = (t: any) => ({ id: t.string({"required":false}), email: t.string({"required":false}), });
Expected output:
export const UserWhereUniqueInputFields = (t: any) => ({ id: t.id({"required":false}), email: t.string({"required":false}), });
Merged. Thanks @hbendev Its now a option "config.inputs.mapIdFieldsToGraphqlId"
I would expect the generated Input objects to have 'ID' scalar as their type instead of String - at least if they they are string types in the db, but maybe other times as well to comply the GraphQL specification.
Related docs: https://graphql.org/learn/schema/#scalar-types
Example schema file:
Actual output:
Expected output: