| 1234567891011121314151617181920212223 |
- # 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'
- namespace :v1 do
- resources :pokemon, only: [] do
- collection do
- post :upload
- end
- end
- end
- match '*path', to: 'v1/application#not_found', via: :all
- end
- get '*path', to: 'welcome#root'
- end
|