Sha256: 5730dca8b784646fbdd4bf7de0333e9caf398948f75e75aa8efafa97429e4f02

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

Rails.application.routes.draw do
  mount_graphql_devise_for(
    User,
    at: '/api/v1/graphql_auth',
    base_controller: CookiesController,
    operations: { login: Mutations::Login, 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:                 [:register],
    operations:           {
      update_password_with_token: Mutations::ResetAdminPasswordWithToken
    },
    at:                   '/api/v1/admin/graphql_auth'
  )

  mount_graphql_devise_for(
    Guest,
    only: [:login, :logout, :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'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
graphql_devise-1.4.0 spec/dummy/config/routes.rb
graphql_devise-1.3.0 spec/dummy/config/routes.rb
graphql_devise-1.2.0 spec/dummy/config/routes.rb