diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 03:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 03:09:30 +0300 |
commit | 060c842402c00f830a810702600cbe39dfa6cf62 (patch) | |
tree | 743bd65ac0c1d4d6518ae8cdd4af5718ec7fb890 /app/graphql | |
parent | 6867eff1f997a881cd3ea64109f7ba2d4b42fde4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/resolvers/environments_resolver.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/graphql/resolvers/environments_resolver.rb b/app/graphql/resolvers/environments_resolver.rb index 868abef98eb..4e9a17f1e17 100644 --- a/app/graphql/resolvers/environments_resolver.rb +++ b/app/graphql/resolvers/environments_resolver.rb @@ -10,6 +10,10 @@ module Resolvers required: false, description: 'Search query' + argument :states, [GraphQL::STRING_TYPE], + required: false, + description: 'States of environments that should be included in result' + type Types::EnvironmentType, null: true alias_method :project, :object @@ -18,6 +22,8 @@ module Resolvers return unless project.present? EnvironmentsFinder.new(project, context[:current_user], args).find + rescue EnvironmentsFinder::InvalidStatesError => exception + raise Gitlab::Graphql::Errors::ArgumentError, exception.message end end end |