update
This method can be used to update nodes, and maps to the underlying Update Mutation.
Returns a Promise
that resolves to the equivalent of the Mutation response for this operation.
Example
For the User with name "John", update their name to be "Jane":
const User = ogm.model("User");
const { users } = await User.update({
where: { name: "John" },
update: { name: "Jane" },
});
Arguments
Name and Type | Description |
---|---|
|
A JavaScript object representation of the GraphQL |
|
A JavaScript object representation of the GraphQL |
|
A JavaScript object representation of the GraphQL |
|
A JavaScript object representation of the GraphQL |
|
A JavaScript object representation of the GraphQL |
|
A JavaScript object representation of the GraphQL |
|
Selection set for the Mutation, see Selection Set for more information. |
|
The |
|
The |
|
The |
Was this page helpful?