Skip to content

Commit

Permalink
Remove id from resolvedData types (#7928)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown authored and dcousens committed Sep 15, 2022
1 parent 1e28e8e commit f416d5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/lib/schema-type-printer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function printInterimType<L extends InitialisedList>(
return [
`type Resolved${typename} = {`,
...Object.entries(list.fields).map(([fieldKey, { dbField }]) => {
if (dbField.kind === 'none') return ` ${fieldKey}?: undefined\n`;
if (dbField.kind === 'none' || fieldKey === 'id') return ` ${fieldKey}?: undefined;`;
if (dbField.kind === 'multi') {
return printInterimMultiFieldType({
listKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ export type KeystoneAdminUISortDirection =
| "DESC";
type ResolvedTodoCreateInput = {
id?: import('.prisma/client').Prisma.TodoCreateInput["id"];
id?: undefined;
title?: import('.prisma/client').Prisma.TodoCreateInput["title"];
};
type ResolvedTodoUpdateInput = {
id?: import('.prisma/client').Prisma.TodoUpdateInput["id"];
id?: undefined;
title?: import('.prisma/client').Prisma.TodoUpdateInput["title"];
};
Expand Down

0 comments on commit f416d5b

Please sign in to comment.