keystone
keystone copied to clipboard
add ability to always include field in update
- this serves as the basis for optimistic locking
- you can now configure a
version
field as readonly and have it included in all update calls - on the server side you can then validate the version with the
item.version
and then throw a validation error in case it does not match - that way a concurrent modification on the server can be identified
fixes #6851
🦋 Changeset detected
Latest commit: 4d34ff2367a44d86789a0fc3ce4f0d6766a1e7c5
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Name | Type |
---|---|
@keystone-6/core | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/4CM6cAQ2vuQ5eyeLXtEFT333va4w
✅ Preview: https://keystone-next-docs-git-fork-rburgst-feature-a-be6ca9-keystonejs.vercel.app
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 4d34ff2367a44d86789a0fc3ce4f0d6766a1e7c5:
Sandbox | Source |
---|---|
@keystone-6/sandbox | Configuration |
What do I need to do to get this change reviewed?
anyone home?
Hi @rburgst,
Sorry for the extended delay, I hope to look into this this week, if any changes are required I'll update this pull request or the related discussion.
Thanks for your patience :pray:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
keystone-next-docs | ✅ Ready (Inspect) | Visit Preview | Oct 23, 2022 at 5:49AM (UTC) |
I have rebased it on to main, @dcousens any chance to get this reviewed?
@rburgst this has been re-added to the priority list for the next release. Thanks for the rebase! I'll keep this thread updated with any changes. I'll try and make a label so we can indicate that status in future :label::blue_heart:
I believe the use case would be more complete along with prisma 4.5.0 with extendWhereUnique
preview feature. hopefully team will consider using this preview feature.
@gautamsi that would obviously be even better. Then however, I guess keystone would need to have a built-in version field which would then utilize this new feature. With my patch you can get "ok-ish" close with your own field implementation.
Replaced by https://github.com/keystonejs/keystone/pull/8283