| 1234567891011121314 |
- # frozen_string_literal: true
- Rails.application.routes.draw do
- mount GraphiQL::Rails::Engine, at: '/-/graphiql', graphql_path: '/api/graphql' if Rails.env.development?
- 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
|