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

Is there a way to specify viewerCanSee just for some loads? #278

Open
noghartt opened this issue Dec 18, 2021 · 0 comments
Open

Is there a way to specify viewerCanSee just for some loads? #278

noghartt opened this issue Dec 18, 2021 · 0 comments

Comments

@noghartt
Copy link
Contributor

Can I specify the viewerCanSee function just for some load? Something like:

UserLoader.load(context, userId, ctx => ctx.user.id)
// On the third argument (optional), either return the `data`  if the value from callback isn't a falsy or `NullConnection`

I think that it would be interesting to deal with "atomic" logic behind some loads. Is there a way to do it? If not, would be interesting to implement something like it?

Probably, based on #240, the first argument context wouldn't be necessary as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant