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

@@ -66,7 +66,6 @@ gem 'turnout', '~> 2.4.0'
gem 'redcarpet'
gem 'graphql'
gem 'graphiql-rails'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
@@ -104,6 +103,7 @@ end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '3.3.0'
gem 'graphiql-rails'
end
eval_gemfile './Gemfile_custom'

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'