graphile / graphile/crystal

`addDependency` should "name" it for better deduplicate resilience

Open
#2,665 0 comments 0 reactions 0 assignees View on GitHub
✨ feature
Dominant language
TypeScript
Stars
12.9k
Forks
625
Avg merge
5h 23m
Merged PRs (30d)
24

Description

If you have one step that does:

```
this.beforeDepId = this.addDependency($cursor)
```

and another of the same class that does:

```
this.afterDepId = this.addDependency($cursor)
```

then Grafast will see them as having the same dependencies even though one step will use this as the "before" and the other as the "after". This means that the step will have to specifically check `this.beforeDepId === peer.beforeDepId && this.afterDepId === peer.afterDepId` when performing deduplicate.

If we instead add names to dependencies then we can check the names line up before calling deduplicate, catching some obvious issues like this by knowing that they're not peers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.