Only mount graphiql in development environment

This commit is contained in:
Alberto Miedes Garcés
2017-01-02 11:27:56 +01:00
parent ac6802572f
commit eadceb106c
2 changed files with 2 additions and 2 deletions

View File

@@ -265,12 +265,12 @@ Rails.application.routes.draw do
end
# GraphQL
mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql'
get '/graphql', to: 'graphql#query'
post '/graphql', to: 'graphql#query'
if Rails.env.development?
mount LetterOpenerWeb::Engine, at: "/letter_opener"
mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql'
end
mount Tolk::Engine => '/translate', :as => 'tolk'