summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-05-23 09:55:14 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-06 10:58:54 +0200
commit9b65d4bb417fb4939289eab94487c894f0a62db6 (patch)
tree1f97b9a1bd0d722a3c3ff4e89ec13bdb7a3aec00 /config
parentc443133e779c4c508b9c6429dd4ba623d64f03f1 (diff)
downloadgitlab-ce-9b65d4bb417fb4939289eab94487c894f0a62db6.tar.gz
Initial setup GraphQL using graphql-ruby 1.8
- All definitions have been replaced by classes: http://graphql-ruby.org/schema/class_based_api.html - Authorization & Presentation have been refactored to work in the class based system - Loaders have been replaced by resolvers - Times are now coersed as ISO 8601
Diffstat (limited to 'config')
-rw-r--r--config/routes/api.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/routes/api.rb b/config/routes/api.rb
index 54ce6d01df0..b1aebf4d606 100644
--- a/config/routes/api.rb
+++ b/config/routes/api.rb
@@ -1,5 +1,7 @@
-post '/api/graphql', to: 'graphql#execute'
-mount GraphiQL::Rails::Engine, at: '/api/graphiql', graphql_path: '/api/graphql'
+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 => '/'