File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class Mapper
33 def mount_graphql_devise_for ( resource , opts = { } )
44 custom_operations = opts [ :operations ] || { }
55
6- path = opts . fetch ( :at , '/' )
6+ path = opts . fetch ( :at , '/graphql_auth ' )
77 mapping_name = resource . underscore . tr ( '/' , '_' ) . to_sym
88
99 devise_for (
@@ -62,8 +62,8 @@ def mount_graphql_devise_for(resource, opts = {})
6262 Devise . mailer . helper ( GraphqlDevise ::MailerHelper )
6363
6464 devise_scope mapping_name do
65- post " #{ path } /graphql_auth" , to : 'graphql_devise/graphql#auth'
66- get " #{ path } /graphql_auth" , to : 'graphql_devise/graphql#auth'
65+ post path , to : 'graphql_devise/graphql#auth'
66+ get path , to : 'graphql_devise/graphql#auth'
6767 end
6868 end
6969 end
Original file line number Diff line number Diff line change 11Rails . application . routes . draw do
2- mount_graphql_devise_for 'User' , at : 'api/v1' , operations : {
2+ mount_graphql_devise_for 'User' , at : '/ api/v1/graphql_auth ' , operations : {
33 login : Mutations ::Login ,
44 sign_up : Mutations ::SignUp
55 }
66
77 mount_graphql_devise_for (
88 'Admin' ,
99 authenticable_type : Types ::CustomAdminType ,
10- at : 'api/v1/admin'
10+ at : '/ api/v1/admin/graphql_auth '
1111 )
1212
1313 post '/api/v1/graphql' , to : 'api/v1/graphql#graphql'
You can’t perform that action at this time.
0 commit comments