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
Can't handle mixed query #109
Comments
Hey @roytan883 👋, Could you explain what the expected behaviour was? This could significantly improve my understanding of your problem. |
if i change the auth function name, you should understand: const canGetFeed = rule()(async (parent, args, ctx, info) => {
console.log("call canGetFeed")
return true
})
const canGetPost = rule()(async (parent, args, ctx, info) => {
console.log("call canGetPost")
return false
})
const permissions = shield({
Query: {
feed: canGetFeed,
post: canGetPost,
},
}) Expect
|
Hmm, ok. That is indeed an interesting situation. Let me explain how Could you provide the actual code that you are using? That would help a lot. Besides that, I recommend you check out the https://github.com/maticzav/graphql-shield/blob/master/README.md#cache |
Hey @roytan883 have you made any progress on this? 🙂 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
code like this:
If the
query
like this, theisAuthenticated
only be called once !!!The text was updated successfully, but these errors were encountered: