-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decimal field with min or max, resolveInput triggers error #8597
Comments
This is most likely due to the Decimal validation expecting to be passed a decimal ( I am assuming if you passed a Decimal into list({
hooks: {
resolveInput: ({ resolvedData }) {
return {
...resolvedData,
lineItem: new Decimal(666)
};
}
}); One possible fix in Keystone, to support passing in a |
Ah! I shall try that. |
Fixed by #9262 |
What do you mean by this? What is passing a Probably easiest to follow Prisma for this |
Steps
resolveInput
that changes the value:create
orupdate
against the listExpected
Items gets created/updated successfully (with the
lineItem: 666
value)Actual
Workarounds
beforeOperation
and mutating theresolvedData
instance works around the problem.max
to field config doesn't help.min
max
validation from field config works around it (but disables validation)number
orstring
fromresolveInput
for thedecimal
field doesn't seem to change anything.The text was updated successfully, but these errors were encountered: