diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-23 09:55:14 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-06-06 10:58:54 +0200 |
commit | 9b65d4bb417fb4939289eab94487c894f0a62db6 (patch) | |
tree | 1f97b9a1bd0d722a3c3ff4e89ec13bdb7a3aec00 /app/graphql/gitlab_schema.rb | |
parent | c443133e779c4c508b9c6429dd4ba623d64f03f1 (diff) | |
download | gitlab-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 'app/graphql/gitlab_schema.rb')
-rw-r--r-- | app/graphql/gitlab_schema.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb index ac75c4bf2e3..de4fc1d8e32 100644 --- a/app/graphql/gitlab_schema.rb +++ b/app/graphql/gitlab_schema.rb @@ -1,12 +1,8 @@ -Gitlab::Graphql::Authorize.register! -Gitlab::Graphql::Present.register! - -GitlabSchema = GraphQL::Schema.define do +class GitlabSchema < GraphQL::Schema use BatchLoader::GraphQL - - enable_preloading - enable_authorization - enable_presenting + use Gitlab::Graphql::Authorize + use Gitlab::Graphql::Present query(Types::QueryType) + # mutation(Types::MutationType) end |