create
This method can be used to update nodes, and maps to the underlying Create Mutation.
Returns a Promise
that resolves to the equivalent of the Mutation response for this operation.
Example
To create a Movie with title "The Matrix":
const Movie = ogm.model("Movie");
await Movie.create({ input: [{ title: "The Matrix" }] })
Arguments
Name and Type | Description |
---|---|
|
JavaScript object representation of the GraphQL |
|
Selection set for the Mutation, see Selection Set for more information. |
|
The |
|
The |
|
The |
Was this page helpful?