Closed MrLoh closed 6 years ago
@MrLoh I need to think about it and how to make it more readable.
Maybe add separate @spread
directive, like this:
movie {
cast {
id
role
person @spread {
actorId: id
fullName
}
}
}
What do you think?
@MrLoh On a second thought create separate directives for every transformation is a bad idea. Thanks to @RomanGotsiy for explaining this to me. Need to think a little bit more about this...
I like the spread idea, it's just a very common task in graphql I think, that's missing from lodash.
This would probably be best covered by #9 as well, maybe we should close this?
@MrLoh Agree 🎉
I have the following query:
Now I would like to flatten the cast into an array of not-nested objects.
It seems like lodash can't do that. Would be nice to add a functionality, maybe like:
I could create a PR, with a little help as to how transformations need to look like.