diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-01-31 03:00:30 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-02-14 15:52:17 +0800 |
commit | 91e9e50a1153021257abaa528498d7a82cc3350f (patch) | |
tree | 654dd11658da179f0bd4bd0eea5e4d63718c99b1 /app/graphql/resolvers/base_resolver.rb | |
parent | 1322146bbf5c76403db10969f1af6540717b1cdf (diff) | |
download | gitlab-ce-91e9e50a1153021257abaa528498d7a82cc3350f.tar.gz |
Add field mergeRequests for project in GraphQL
And fix the tests so that it won't run into circular paths.
Diffstat (limited to 'app/graphql/resolvers/base_resolver.rb')
-rw-r--r-- | app/graphql/resolvers/base_resolver.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/graphql/resolvers/base_resolver.rb b/app/graphql/resolvers/base_resolver.rb index 459933af9d3..063def75d38 100644 --- a/app/graphql/resolvers/base_resolver.rb +++ b/app/graphql/resolvers/base_resolver.rb @@ -2,5 +2,12 @@ module Resolvers class BaseResolver < GraphQL::Schema::Resolver + def self.single + @single ||= Class.new(self) do + def resolve(**args) + super.first + end + end + end end end |