@@ -121,12 +121,16 @@ class User < ApplicationRecord
121121 :confirmable
122122
123123 # including after calling the `devise` method is important.
124+ # include DeviseTokenAuth::Concerns::User # is also valid (generator includes this one).
124125 include GraphqlDevise ::Concerns ::Model
125126end
126127```
127128
128129The install generator can do this for you if you specify the ` user_class ` option.
129130See [ Installation] ( #Installation ) for details.
131+ The generator will include a different module in your model, ` DeviseTokenAuth::Concerns::User ` which is also correct,
132+ we just made an alias on our namespace for consistency and possible extension.
133+ Generators have to be updated to generate our module.
130134
131135### Customizing Email Templates
132136The approach of this gem is a bit different from DeviseTokenAuth. We have placed our templates in ` app/views/graphql_devise/mailer ` ,
@@ -145,6 +149,9 @@ In our example our model is `User`, so it would look like this:
145149# app/controllers/my_controller.rb
146150
147151class MyController < ApplicationController
152+ # include DeviseTokenAuth::Concerns::SetUserByToken # is also valid (generator includes this one).
153+ include GraphqlDevise ::Concerns ::SetUserByToken
154+
148155 before_action :authenticate_user!
149156
150157 def my_action
155162
156163The install generator can do this for you because it executes DTA installer.
157164See [ Installation] ( #Installation ) for details.
165+ The generator will include a different module in your model, ` DeviseTokenAuth::Concerns::SetUserByToken ` which is also correct,
166+ we just made an alias on our namespace for consistency and possible extension.
167+ Generators have to be updated to generate our module.
158168
159169### Making Requests
160170Here is a list of the available mutations and queries assuming your mounted model is ` User ` .
0 commit comments