@@ -37,8 +37,9 @@ def mount_graphql_devise_for(resource, opts = {})
3737
3838 devise_for (
3939 resource . pluralize . underscore . tr ( '/' , '_' ) . to_sym ,
40- module : :devise ,
41- skip : [ :sessions , :registrations , :passwords , :confirmations , :omniauth_callbacks , :unlocks , :invitations ]
40+ module : :devise ,
41+ class_name : resource ,
42+ skip : [ :sessions , :registrations , :passwords , :confirmations , :omniauth_callbacks , :unlocks , :invitations ]
4243 )
4344
4445 authenticatable_type = opts [ :authenticatable_type ] ||
@@ -55,7 +56,7 @@ def mount_graphql_devise_for(resource, opts = {})
5556 custom_operations [ action ]
5657 else
5758 new_mutation = Class . new ( mutation )
58- new_mutation . graphql_name ( "#{ resource } #{ action . to_s . camelize ( :upper ) } " )
59+ new_mutation . graphql_name ( "#{ resource . gsub ( '::' , '' ) } #{ action . to_s . camelize ( :upper ) } " )
5960 new_mutation . field ( :authenticatable , authenticatable_type , null : true )
6061
6162 new_mutation
@@ -83,7 +84,7 @@ def mount_graphql_devise_for(resource, opts = {})
8384 custom_operations [ action ]
8485 else
8586 new_query = Class . new ( query )
86- new_query . graphql_name ( "#{ resource } #{ action . to_s . camelize ( :upper ) } " )
87+ new_query . graphql_name ( "#{ resource . gsub ( '::' , '' ) } #{ action . to_s . camelize ( :upper ) } " )
8788 new_query . type ( authenticatable_type , null : true )
8889
8990 new_query
0 commit comments