-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathroutes.rb
More file actions
42 lines (37 loc) · 1.34 KB
/
routes.rb
File metadata and controls
42 lines (37 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# frozen_string_literal: true
Rails.application.routes.draw do
mount_graphql_devise_for 'User', at: '/api/v1/graphql_auth', operations: {
login: Mutations::Login,
sign_up: Mutations::SignUp,
register: Mutations::Register
}, additional_mutations: {
register_confirmed_user: Mutations::RegisterConfirmedUser
}, additional_queries: {
public_user: Resolvers::PublicUser
}
mount_graphql_devise_for(
Admin,
authenticatable_type: Types::CustomAdminType,
skip: [:sign_up, :register, :check_password_token],
operations: {
confirm_account: Resolvers::ConfirmAdminAccount,
update_password_with_token: Mutations::ResetAdminPasswordWithToken
},
at: '/api/v1/admin/graphql_auth'
)
mount_graphql_devise_for(
'Guest',
only: [:login, :logout, :sign_up, :register],
at: '/api/v1/guest/graphql_auth'
)
mount_graphql_devise_for(
'Users::Customer',
only: [:login],
at: '/api/v1/user_customer/graphql_auth'
)
get '/api/v1/graphql', to: 'api/v1/graphql#graphql'
post '/api/v1/graphql', to: 'api/v1/graphql#graphql'
post '/api/v1/interpreter', to: 'api/v1/graphql#interpreter'
post '/api/v1/failing', to: 'api/v1/graphql#failing_resource_name'
post '/api/v1/controller_auth', to: 'api/v1/graphql#controller_auth'
end