-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add: async creation of items #2146
Conversation
I submitted a different PR that made all of the I have some free time tonight and tomorrow and am planning on tackling the |
Just pushed some updates that implement a |
Commit keystonejs/keystone@a73d131 adds a minimal version of |
Newest commits by Jed implement this API in a cleaner way. Closing the PR. |
This is a WIP to tackle issues: keystonejs/keystone#1705, keystonejs/keystone#1713, and keystonejs/keystone#1714. I'd love to get some feedback on it.
I just implemented async validation and left the
.updateItem
method alone. If this approach looks like the right direction, I'll make theupdateItem
methods async as well. From there, it should be easy to add the.processUpdateData
api and handle file uploads.A couple questions about the API in general:
.validateInput
api return more information than justfalse
when there is an invalid input? I'm having trouble seeing how we would implement more granular error messages with the API as is.files
be passed to the.validateInput
method too or should file validation happen somewhere else?required
to.validateInput(data, required, item, callback)
when the field has the property.required
and it can be accessed withthis.required
in the.validateInput
method?Overall, this new API seems way cleaner than the UpdateHandler approach.