You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that you are doing authentication. As far as I know, there are two methods to do authorization,
1)manually checking for authentication in each resolver.
2)using directives as middleware as explained here. ardatan/graphql-tools#212
which is pushed to graphql-tools but it is limiting.
Please Note:
The method 2 using directive is limiting as it DOES NOT work on QUERIES, but rather only work on FIELD_DESCRIPTIONS.
👋 I'll close this since it's quite old and also doesn't appear to be a bug with Apollo Server, but rather a question about how to use it or one of its components.
For more on error handling, check out the documentation for errors.
Rather than asking it here in GitHub Issues — where efforts are focused on fixing bugs and adding new features — I'd ask that you take this question to the Apollo Server channel within the Apollo community on Spectrum.chat where there are community members who might be able to relate to a similar problem, or might be able to help you out more interactively. Thanks for your understanding!
How can I respond with custom Errors while querying:
app.use('/graphql', graphqlExpress((req) => {
The text was updated successfully, but these errors were encountered: