| 12345678910111213141516171819202122 |
- # frozen_string_literal: true
- Rails.application.routes.draw do
- mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql' if Rails.env.development?
- post '/graphql', to: 'graphql#execute'
- root to: 'welcome#root'
- namespace :api, defaults: {formats: :json} do
- namespace :v1 do
- resources :pokemon do
- collection do
- post :upload
- end
- end
- end
- match '*path', to: 'v1/application#not_found', via: :all
- end
- get '*path', to: 'welcome#root'
- end
|