Closed TomasBarry closed 3 years ago
@mcelicalderon, how would you like this to be tested, or is this sufficient?
Edit: test failures are confusing me a bit. Any idea what it may be?
Thank you, @TomasBarry! I can think of a way of testing that right now, but we can take care of that afterwards as existing tests didn't break. Apparently dta finally stopped supporting ruby 2.2 and that's why one of tests failed. As that's one of our main dependencies, we will drop support too. I'll fix that before merging your PR, so máster doesn't fail.
If using Object Authorization that relies on
context[:current_resource]
it is not possible to query for data on the authenticatable object sincecontext[:current_user]
isnil
after logging in since this is set at the controller level.This commit fixes this by setting
context[:current_resource]
toresource
ifcontext[:current_resource]
isnil
(as the implementation may override this already).GitHub issue - https://github.com/graphql-devise/graphql_devise/issues/192