diff options
Diffstat (limited to 'app/graphql/types/ci/job_need_union.rb')
-rw-r--r-- | app/graphql/types/ci/job_need_union.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/graphql/types/ci/job_need_union.rb b/app/graphql/types/ci/job_need_union.rb index 59608a6a312..61ad5432db8 100644 --- a/app/graphql/types/ci/job_need_union.rb +++ b/app/graphql/types/ci/job_need_union.rb @@ -8,9 +8,10 @@ module Types possible_types Types::Ci::JobType, Types::Ci::BuildNeedType def self.resolve_type(object, context) - if object.is_a?(::Ci::BuildNeed) + case object + when ::Ci::BuildNeed Types::Ci::BuildNeedType - elsif object.is_a?(CommitStatus) + when CommitStatus Types::Ci::JobType else raise TypeNotSupportedError |