The patch method allows updating specific fields of a document in a collection. It modifies only the provided fields while keeping the rest unchanged. If pick or omit is defined in config.json, the backend will enforce these rules to allow or restrict certain fields. The backend also applies custom conditions using q, for example, ensuring users can only update their own todos. The method returns the updated object based on the project configuration.
const todo = await client.collection("todos").patch({
"title": "Updated Task" }, { _id: "661d42f7b39a4b0012a67f12" })