Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Why We Need This?
When using Neptune with Gremlin, I've noticed the need to specify cardinality in every property() call. While I'm not arguing against the importance of cardinality, it would enhance code clarity or code duplication that may be required to work with target engine if Gremlin allowed users to set a preferred default cardinality. This way, we could potentially omit the cardinality parameter in subsequent property() calls, leading to tidier and less confusing code. This also allow me to code for graph systems that do not support cardinality or support other types of cardinalities than the set.
Proposed Implementation
TinkerPop can introduce g.with(defaultCardinality, single) - this would provide the hint a graph would need to override their default cardinality for every property mutation where cardinality is not explicit.