0.6.0 Breaking Changes #116
Brendonovich
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With Prisma Client Rust beginning to form an identity of its own, separate to Prisma Client Go, I'm considering changing some things to be more inline with other Prisma clients.
Naming
link()
->connect()
unlink()
->disconnect()
Calling mutations
find_*().update()
->update_*()
find_*().delete()
->delete_*()
Required
create()
argumentscreate()
already knows which field each of its required arguments are, so it's frankly a bit silly that you have to wrap each required argument in a field specifier.create(user::points::set(0), vec![])
->create(0, vec![])
create(uset::profile::link(profile::id::equals(0)), vec![])
->create(profile::id::equals(0), vec![])
Removal of
Cursor
typeWhen cross-referencing with the Prisma Client JS documentation, I realized that the type of a
cursor
argument is just aUniqueWhereInput
, so from now on that is what will be used.field::cursor
functions will no longer be needed, just usefield::equals
as a drop in replacement.Other stuff
I could also change
with()
toinclude()
, but I have things I want to do withinclude()
in the future. I thinkwith()/fetch()
is a good combination, especially sincewith()
doesn't do the same thing in terms of type safety thatinclude
does in the JS client.If you have any other ideas please let me know down below!
Beta Was this translation helpful? Give feedback.
All reactions