Only mount graphiql in development environment
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user