graphql-devise / graphql_devise

GraphQL interface on top devise_token_auth
MIT License
200 stars 39 forks source link

Allow controller level authentication #175

Closed mcelicalderon closed 3 years ago

mcelicalderon commented 3 years ago

Right now authentication happens during GQL query execution and there's no good way to authenticate at the controller level first.

This change will allow controllers so authenticate a resource before reaching the GQL schema. This could be useful in scenarios like the one discussed in #151

This way you will be able to send current_resource to the GQL context and I think we will probably deprecate not sending that one when you expect the resource to be authenticated.