diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-14 03:10:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-14 03:10:00 +0000 |
commit | f5a8ebd6b7da5501100d66b43050be7b26b04665 (patch) | |
tree | a003a4e0531ad16c18344dfb3c6949f13aa6db3f /app/graphql/gitlab_schema.rb | |
parent | 968e01a6dd8f4765223f4d1ffb096483f5cce3eb (diff) | |
download | gitlab-ce-f5a8ebd6b7da5501100d66b43050be7b26b04665.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/gitlab_schema.rb')
-rw-r--r-- | app/graphql/gitlab_schema.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/graphql/gitlab_schema.rb b/app/graphql/gitlab_schema.rb index 73eb93cd7a6..d8967da9f57 100644 --- a/app/graphql/gitlab_schema.rb +++ b/app/graphql/gitlab_schema.rb @@ -48,6 +48,13 @@ class GitlabSchema < GraphQL::Schema super(query_str, **kwargs) end + def get_type(type_name) + # This is a backwards compatibility hack to work around an accidentally + # released argument typed as EEIterationID + type_name = type_name.gsub(/^EE/, '') if type_name.end_with?('ID') + super(type_name) + end + def id_from_object(object, _type = nil, _ctx = nil) unless object.respond_to?(:to_global_id) # This is an error in our schema and needs to be solved. So raise a @@ -144,6 +151,13 @@ class GitlabSchema < GraphQL::Schema end end end + + # This is a backwards compatibility hack to work around an accidentally + # released argument typed as EE{Type}ID + def get_type(type_name) + type_name = type_name.gsub(/^EE/, '') if type_name.end_with?('ID') + super(type_name) + end end GitlabSchema.prepend_if_ee('EE::GitlabSchema') # rubocop: disable Cop/InjectEnterpriseEditionModule |