Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d6655c0
Commit
0d6655c0
authored
Aug 13, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse GlobalID types prefixed with EE as if not prefixed
parent
07c16be9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
app/graphql/gitlab_schema.rb
app/graphql/gitlab_schema.rb
+14
-0
No files found.
app/graphql/gitlab_schema.rb
View file @
0d6655c0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment