Kudos and a question
jole78 opened this issue · 3 comments
First of all thanks so much for this library. It kinda helped me convince my teammates that graphql is the way forward.
And the question. Let's say I have a query like so:
profiles {
id
users {
name
}
}
Here I want 'id' to be "sent" to profiles as a projection but I don't really care about 'users' since that's a separate collection and preferably sent along to another place which could do the same projection but only for users. Is there a way to "skip" keys or something. I know I can just delete the keys I don't want but....
Ideally I would like it to be something like:
['id'] --- profiles projections
['name'] --- users projections
Come to think of it now that I've worked around the issue is that maybe it could support a white list instead. "only map these"...optional of course.
And maybe a way to configure always excluded keys...like "__typename" as an example.
Thanks, @jole78
Got your point. Sounds like a reasonable improvement for me. I guess we can suggest something like skip option which would filter output fields... Will take a look on that as far as there will be a free time. Anyway, feel free to suggest your PRs if you have any.
Wow you're fast. Was just looking through the code to get an idea of how to implement something like it as a PR. Code looks in great shape btw.
I'll have a look on Monday when I'm back at work ok. Closing issue for now at least.