keystone
keystone copied to clipboard
Missing CreateInput for custom IdField
- Set
idFieldkindtostringornumber, do not set anyresolveInput.createhook to assign id filed value - try to create an item
- it should throw error that idfield is not provided
- Try to create item with graphql playground
- Notice no id field input for creating new item
Expect to be able to create item with id field in input.
in my case I am generating a log tabl;e entry on order change which can always provide custom id while creating an item instead of setting a value as part of resolveInput.
Alternatively you can use context.prisma to create such item.