summaryrefslogtreecommitdiff
path: root/config/routes/api.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes/api.rb')
-rw-r--r--config/routes/api.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/routes/api.rb b/config/routes/api.rb
index ce7a7c88900..b1aebf4d606 100644
--- a/config/routes/api.rb
+++ b/config/routes/api.rb
@@ -1,2 +1,7 @@
+constraints(::Constraints::FeatureConstrainer.new(:graphql)) do
+ post '/api/graphql', to: 'graphql#execute'
+ mount GraphiQL::Rails::Engine, at: '/-/graphql-explorer', graphql_path: '/api/graphql'
+end
+
API::API.logger Rails.logger
mount API::API => '/'