Open parse opened 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Bump, would love some feedback on this. If it seems like a good idea I can give the implementation a shot.
I am in need of this feature as well. I need to be able to tell the difference between a user trying to access a field they're not authorized to access vs the user is not logged in at all.
This is a question as well as a suggestion.
I'm combining graphql-ruby and graphql-guard with Doorkeeper+Sorcery to handle my authentication. In my
graphql_controller.rb
I have:And my policy is:
So when a user is not authenticated, I expect the
Unauthenticated
error to be returned, but instead I get theNot authorized to access #{type}.#{field}
defined ingraphl_controller.rb
.Question:
Would it make sense to add the context to the callback so one could do something like this?
That way we wouldn't remove any other errors that are in there and we can see that we are in fact unauthenticated as well as unauthorized.