delete
This method can be used to delete nodes, and maps to the underlying Delete Mutation.
Returns a Promise
which resolvers to a DeleteInfo
object:
Name and Type | Description |
---|---|
|
The number of nodes deleted. |
|
The number of relationships deleted. |
Example
To delete all User nodes where the name is "Dan":
const User = ogm.model("User");
await User.delete({ where: { name: "Dan" }});
Arguments
Name and Type | Description |
---|---|
|
A JavaScript object representation of the GraphQL |
|
A JavaScript object representation of the GraphQL |
|
The |
|
The |
Was this page helpful?