Implements logic to rebase fragments/selections on a given schema.
This is a big PR that introduces some to the underlying selection set data structures - NormalizedFragmentSpreadSelection now includes a selection set from corresponding fragment definition. This now matches how they were represented in both JS and RS implementations.
Some differences between implementations:
spread selection does not store NamedFragments in RS implementation and instead we just pass those over whenever needed
NamedFragments are using IndexMap to store NormalizedFragments and is initialized in their dependency order (i.e. if fragment A depends on B then B will be inserted first). Since they are initialized in order, we no longer need to apply the mapInDependencyOrder for other operations -> this method was now renamed to initialize_in_dependency_order
RebasedFragments now store empty NamedFragments, in JS implementation those values were undefined
Implements logic to rebase fragments/selections on a given schema.
This is a big PR that introduces some to the underlying selection set data structures -
NormalizedFragmentSpreadSelection
now includes a selection set from corresponding fragment definition. This now matches how they were represented in both JS and RS implementations.Some differences between implementations:
NamedFragments
in RS implementation and instead we just pass those over whenever neededNamedFragments
are usingIndexMap
to storeNormalizedFragments
and is initialized in their dependency order (i.e. if fragmentA
depends onB
thenB
will be inserted first). Since they are initialized in order, we no longer need to apply themapInDependencyOrder
for other operations -> this method was now renamed toinitialize_in_dependency_order
RebasedFragments
now store emptyNamedFragments
, in JS implementation those values wereundefined