Skip to main content
Deleted a graph constraint. Examples For an introduction to constraints see GRAPH.CONSTRAINT CREATE

Required arguments

key

is key name for the graph.

constraintType

is the constraint type: either MANDATORY or UNIQUE.

NODE label | RELATIONSHIP reltype

is the graph entity type (NODE or RELATIONSHIP) and the name of the node label or relationship type on which the constraint is enforced.

propCount

is the number of properties following. Valid values are between 1 and 255.

prop...

is a list of propCount property names.

Return value

@simple-string-reply - OK if executed correctly, or @error-reply otherwise.

Examples

To delete a unique constraint for all nodes with label Person enforcing uniqueness on the combination of values of attributes first_name and last_name, issue the following command:

Frequently Asked Questions

Unlike constraint creation, dropping a constraint is synchronous. The command returns OK immediately upon successful removal.
No, the supporting index is not automatically removed. You can drop it separately if it is no longer needed, but it may still be useful for query performance.
The command will return an error indicating that the specified constraint was not found.
No. Dropping a constraint only removes the enforcement rule. Existing data remains unchanged; it simply will no longer be validated against that constraint.