<@U4LA03NLV> said this feature is being promoted t...
# orm-help
j
@do4gr said this feature is being promoted to beta here https://github.com/prisma/prisma/issues/2036#issuecomment-452622564 (hope it’s okay to mention you)
h
You need to upgrade your prisma server version as well
In docker
j
I use demo servers... hmm I guess they’re not beta
err
h
They are indeed beta, thanks for reporting though I will have a look
j
ah ! ok thank you !
Hello @Harshit, did you have a chance to report the issue and get some info ? Thank you again
d
Hey, I had a look and it is working for me on the demo servers. The mutation is available only in update statements and only if concerning toMany relations. The reason is that otherwise connect is already expressing the functionality set would have in that case. So for this data model:
Copy code
type User {
  id: ID! @unique
  name: String! @unique
  blogs: [Blog!]!
}

type Blog {
  id: ID! @unique
  name: String! @unique
  users: [User!]!
}
You can do this:
Copy code
mutation aaa {
  updateUser(
    where: { name: "user" }
    data: { blogs: { set: { name: "second" } } }
  ) {
    id
  }
}
Maybe you were trying to use it with 1to1 relations or within a create?
j
Thank you for the update ! I just checked in the prisma cloud playground and I see the set field. But in my local playground, where I use prisma-binding, I dont see it. I did a deploy after updating, do you have a lead on why I do not see the set field in my local instance ?
There is definitely something wrong with prisma-binding, I tried to execute the mutation on the prisma cloud playground and it did work fine. Then, I updated my custom schema to manually add the set field. In the resolver, when I invoke the prisma mutation it does not work.
message has been deleted
message has been deleted
message has been deleted
message has been deleted
ah ! my typeDefs were pointing to the generated schema, which did not include the set field. So it seems to be a generator issue only.
d
Yes, we are updating the schema generator at the moment. It was out of sync with the server schema in a couple of areas. We’ll probably have it back in sync after todays release.
j
great news !
Will I have some package to update ?
Just updated to 1.27 beta and set field is now generated