I'm trying to provide a "sign in" for GraphQL queries in a Rails (4.2.10) app. The "user" and "password" fields are being passed in. In my mutations.rb, I have:
field :signin, !types.Boolean do
argument :user, !types.String
argument :password, !types.String
resolve -> (_, args, _) {
#what here?
}
end
Some documentation (out of date?) suggests:
Doorkeeper.authenticate args
This gets me a "undefined method `authorization'" in my tests, which I assume means I'm missing a callback somewhere. I've dug down but not been able to figure out what I need.
I've also tried
Doorkeeper::Application.by_uid_and_secret args.user, args.password
and this seems to return nil.