Skip to content

remove reflexive edges from results #899

@MichaelJCompton

Description

@MichaelJCompton

Add a directive to remove self edges from results. For example, in the following query, to remove actors as co actors of themselves.

{
  coactors(func:allofterms(name, "Jane Campion")) @cascade @normalize {
    JC_films as director.film {      # JC_films = all Jane Campion's films
      starting_movie: name
      starring {
        JC_actors as performance.actor {      # JC_actors = all actors in all JC films
          actor : name
          actor.film {
            performance.film @filter(not var(JC_films)) {  # find a different film
              film_together : name
              starring {
                # find a coactor who has been in some JC film
                performance.actor @filter(var(JC_actors)) {
                  coactor_name: name
                }
              }
            }
          }
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

Labels

kind/featureSomething completely new we should consider.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions