apollographql / federation-next

Moved to the Router repository
https://github.com/apollographql/router/tree/dev/apollo-federation
Other
19 stars 1 forks source link

Ported anImplementationIsEntityWithFieldShareable from JS #260

Closed TylerBloom closed 4 months ago

TylerBloom commented 5 months ago

This PR addresses FED-33 and is a port of anImplementationIsEntityWithFieldShareable.

There are a number of differences between how the JS code and Rust code represent query graphs, graph paths, nodes, and edges. The original source code is linked above. I tried to keep everything one-to-one, but there is one thing that seems to not be needed: the baseType function. This is called a few times in the original JS code, but I was unable to find a translation for it.

goto-bus-stop commented 4 months ago

Type::inner_named_type is the apollo-compiler equivalent of baseType. if its not actually needed, then good!

TylerBloom commented 4 months ago

@goto-bus-stop , thanks! To be safe, I updated the port to use Type::inner_named_type. This PR is ready for review.

TylerBloom commented 4 months ago

All current comments should be resolved.