| 123456789101112131415161718192021222324 |
- # frozen_string_literal: true
- Rails.application.routes.draw do
- if Rails.env.development?
- mount GraphiQL::Rails::Engine,
- at: '/-/graphiql',
- graphql_path: '/api/graphql'
- end
- devise_for :users,
- controllers: {
- omniauth_callbacks: 'users/omniauth_callbacks',
- registrations: 'users/registrations',
- }
- root to: 'welcome#root'
- namespace :api, defaults: {formats: :json} do
- post '/graphql', to: 'graphql#execute'
- match '*path', to: 'application#not_found', via: :all
- end
- get '*path', to: 'welcome#root'
- end
|