graphql-mongo-helpers
graphql-mongo-helpers copied to clipboard
Is there a way to specify `viewerCanSee` just for some `load`s?
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 load
s. 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.