Update data with a different field than ID



I have a SID field in graphql schema and want to perform update based on the SID and not with ID, the reason is i get data from a provider in websocket which will have SID and have to insert the data into graph if not present else have update based on SID, if i have depend on ID generated by graphql then either i have to maintain a mapping b/w SID and ID locally (which will be error prone to maintain a cache of ID) or the other way is to fetch the ID based on SID and then perform update which will perform one more fetch.
Can you please help me regarding this.



In Prisma you can often select nodes based on any unique field, for example a slug, an email or a number.
You can read more about this here: