Skip to content
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

Kudos and a question #4

Closed
jole78 opened this issue Feb 27, 2019 · 3 comments
Closed

Kudos and a question #4

jole78 opened this issue Feb 27, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@jole78
Copy link

jole78 commented Feb 27, 2019

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.

@Mikhus
Copy link
Owner

Mikhus commented Feb 28, 2019

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.

Mikhus added a commit that referenced this issue Mar 1, 2019
@Mikhus
Copy link
Owner

Mikhus commented Mar 1, 2019

@jole78
Please, take a look at version 2.1.1, now it should support skip option...

@jole78
Copy link
Author

jole78 commented Mar 1, 2019

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.

@jole78 jole78 closed this as completed Mar 1, 2019
@Mikhus Mikhus added the enhancement New feature or request label Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants