apollosolutions / federation-subscription-tools

A set of demonstration utilities to facilitate GraphQL subscription usage alongside a federated data graph
MIT License
106 stars 34 forks source link

fieldPathsAsStrings potential issue? #9

Open sean-clarke opened 3 years ago

sean-clarke commented 3 years ago

In https://github.com/apollosolutions/federation-subscription-tools/blob/main/src/datasources/GatewayDataSource/index.js you have a function fieldPathsAsStrings.

I may misunderstood the intention of this function, however it appears to me that line 129 should replace the occurrence of key with fullPath, otherwise, if that function was given an input like so: fieldPathsAsString({ a: { a: { a: '' } } }) The result would be: ['a', 'a', 'a.a.a'] Whereas I believe the expectation is for that input to return: ['a', 'a.a', 'a.a.a']?

Please let me know if my assumption is correct and I can open a PR, cheers