-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested fields? #5
Comments
@Maxpain177 not at the moment, but shouldn't be too hard to implement |
Hello. Thanks for creating this nice library! Any updates about this part? For example, I use pagination, and I want to create projection not for root, but for nested query fragment. My query looks like this:
I would like to create projection only for data subquery. How is it possible? |
Hey @du5rte So I see this is an long standing issue and I was attempting to implement this feature since I would like to use it in a project I am currently working on. I believe I have the functionality done, however I would like to add tests to make sure. While I was trying to get my tests to pass I notice that the MockDB was using the {
_id: true,
'nested.level': 1,
'nested.nested.level': 1,
'nested.nested.otherField': 1
} FYI I added another user and updated the resolver to include my nested fields. Therefore I am asking if it would be alright with you if I changed the MockDB to using the MongoDB Jest setup? That way the resolver can query against mongodb directly, and the projection for the nested field will return the correct document shape. |
@natac13 Yeah, go for it! |
This package supports nested fields like
{ 'profile.name': true }
?The text was updated successfully, but these errors were encountered: