Commit 2b5796a
Sylvain Lebresne
Refactor code to extract subgraphs from supergraphs (#2655)
The subgraph extraction code is currently written as a single method
that handles all join spec versions. There is however a fair number
of differences betwee the version 0.1 of the join spec (the one
generated by federation 1) and its successor (generated by federation
2), due to 1) having no ownership in fed2 and 2) the join spec 0.2+
versions tracking types much more systematically.
So this commit actually separate the code for extracting each versions,
or more precisely, has one method for join 0.1 and one for join 0.2+
(the difference between join 0.2 and 0.3 are a lot more minor). Doing
may increase the total LOC technically, but it also makes each version
a lot clearer. This also allows to refactor the 0.2+ version a bit
to use the fact that those version are more systematic in the metadata
they provide, and do things a bit more efficiently.1 parent 235b0e2 commit 2b5796a
3 files changed
Lines changed: 657 additions & 397 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments