Update

Use to update many nodes. The model.update method maps to the underlying Update operation.

1. Usage

const User = ogm.model("User");

const { users } = await User.update({
    where: { name: "bob" },
    update: { name: "Bob" },
});

2. Args

2.1. where

JavaScript object representation of the GraphQL where input type, used for Queries.

2.2. update

JavaScript object representation of the GraphQL update input type, used for Update.

2.3. connect

JavaScript object representation of the GraphQL connect input type, used for Update.

2.4. disconnect

JavaScript object representation of the GraphQL disconnect input type, used for Update.

2.5. create

JavaScript object representation of the GraphQL create input type, used for Update.

2.6. selectionSet

Reference: Selection Set

2.7. args

The arguments for the GraphQL Query.

2.8. context

The context for the GraphQL Query.

2.9. rootValue

The rootValue for the GraphQL Query.