Commit 796220f
committed
Fixes #192 - Update context upon login
If using [Object Authorization](https://graphql-ruby.org/authorization/authorization.html#object-authorization)
that relies on `context[:current_resource]` it is not possible to query
for data on the authenticatable object since `context[:current_user]` is
`nil` after logging in since this is set at the controller level.
This commit fixes this by setting `context[:current_resource]` to
`resource` _if_ `context[:current_resource]` is `nil` (as the
implementation may override this already).
GitHub issue - #1921 parent a69b27a commit 796220f
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
0 commit comments