I have changed from using the Map to an object like so { fieldA: 1, nested: { fieldB: 1 } }
I am now passing in an fragments from ast in getNestedQueryInfo and then checking if the sel.kind is of FragmentSpread, if so pass in the Fragments fieldNode to getSelections
I just wanted to see your thoughts first, before I make more PRs to your project.
Hey Adam,
Just opening some issues that I am wondering about as I attempt to implement the same logic you have from queryUtils.js and projectUtils.js
Are fragments supported when it comes to building the
$project
stage ingetNestedQueryInfo
andgetSelections
When I was writing it I came to that stumbling block and had to do something like the following.
I have changed from using the
Map
to an object like so{ fieldA: 1, nested: { fieldB: 1 } }
I am now passing in an fragments fromast
ingetNestedQueryInfo
and then checking if thesel.kind
is of FragmentSpread, if so pass in the FragmentsfieldNode
togetSelections
I just wanted to see your thoughts first, before I make more PRs to your project.