Types::AccessLevelEnum::UnresolvedValueError: `AccessLevel.stringValue` returned `60` at `project.environment.protectedEnvironments.nodes.1.dep...
Problem
When Protected Environment allows Admin role to deploy, the following GraphQL query results in 500 error.
{
project(fullPath: "<path>") {
name
environment(name: "production") {
name
protectedEnvironments {
nodes {
group { name }
project { name }
deployAccessLevels {
nodes {
user {
name
}
group {
name
}
accessLevel {
stringValue
}
}
}
}
}
}
}
}
This is because Types::AccessLevelEnum
doesn't define ADMIN: 60
.
Proposal
Add ADMIN: 60
to Types::AccessLevelEnum
.
Auto Generated
https://sentry.gitlab.net/gitlab/gitlabcom/issues/4056028/?referrer=gitlab_plugin
Types::AccessLevelEnum::UnresolvedValueError: `AccessLevel.stringValue` returned `60` at `project.environment.protectedEnvironments.nodes.1.deployAccessLevels.nodes.2.accessLevel.stringValue`, but this isn't a valid value for `AccessLevelEnum`. Update the field or resolver to return one of `AccessLevelEnum`'s values instead.
lib/gitlab/graphql/tracers/timer_tracer.rb:20:in `trace'
yield
lib/gitlab/graphql/generic_tracing.rb:48:in `with_labkit_tracing'
return yield unless Labkit::Tracing.enabled?
lib/gitlab/graphql/generic_tracing.rb:38:in `platform_trace'
with_labkit_tracing(tags, &block)
lib/gitlab/graphql/tracers/logger_tracer.rb:14:in `trace'
yield
lib/gitlab/graphql/tracers/metrics_tracer.rb:13:in `trace'
result = yield
...
(245 additional frame(s) were not displayed)
Edited by Ahmed Hemdan