typedb / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
191 stars 44 forks source link

Graph visualiser can show duplicated concepts #721

Closed james-whiteside closed 1 year ago

james-whiteside commented 1 year ago

Description

When retrieving additional concepts not returned by the query itself as part of the edge-building process, if a concept is the same as one of those returned by the query, the concept is shown twice in the graph visualisation.

Environment

  1. TypeDB version: 2.16.1
  2. OS of TypeDB server: MacOS 12.6.1
  3. Studio version: 2.14.2
  4. OS of Studio: MacOS 12.6.1

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Run queries:
    
    define
    person sub entity, owns email, plays object-ownership:owner;
    file sub entity, owns path, plays object-ownership:object;
    object-ownership sub relation, related owner, relates, object;
    email sub attribute, value string;
    path sub attribute value string;

insert $p isa person, has email "gavin.harrison@vaticle.com"; $f isa file, has path "root/typedb/src/readme.md"; (object: $f, owner: $p) isa object-ownership;

2. Run query:

match $p isa person, has email "gavin.harrison@vaticle.com";

3. Verify one result is returned.
4. Run query:

match $f isa file, has path "root/typedb/src/readme.md"; $o (object: $f) isa object-ownership; $p isa person, has email "gavin.harrison@vaticle.com";



## Expected Output

![Screenshot 2023-04-05 at 12 49 57](https://user-images.githubusercontent.com/117453030/230071833-2370606b-cf8b-43c1-ba22-64677a735062.png)

## Actual Output

![Screenshot 2023-04-05 at 12 49 45](https://user-images.githubusercontent.com/117453030/230071773-4c5c3c62-b23e-48fc-ae5e-91f14be0e5c4.png)
james-whiteside commented 1 year ago

Could not reproduce.