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
da30fdb5
Commit
da30fdb5
authored
Dec 05, 2019
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Connect designs-at-version to versions
parent
a8163733
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
ee/app/graphql/types/design_management/version_type.rb
ee/app/graphql/types/design_management/version_type.rb
+19
-2
ee/spec/graphql/types/design_management/version_type_spec.rb
ee/spec/graphql/types/design_management/version_type_spec.rb
+5
-1
No files found.
ee/app/graphql/types/design_management/version_type.rb
View file @
da30fdb5
...
...
@@ -2,19 +2,36 @@
module
Types
module
DesignManagement
class
VersionType
<
BaseObject
class
VersionType
<
::
Types
::
BaseObject
# Just `Version` might be a bit to general to expose globally so adding
# a `Design` prefix to specify the class exposed in GraphQL
graphql_name
'DesignVersion'
description
'A specific version in which designs were added, modified or deleted'
authorize
:read_design
field
:id
,
GraphQL
::
ID_TYPE
,
null:
false
,
description:
'ID of the design version'
field
:sha
,
GraphQL
::
ID_TYPE
,
null:
false
,
description:
'SHA of the design version'
field
:designs
,
Types
::
DesignManagement
::
DesignType
.
connection_type
,
null:
false
,
field
:designs
,
::
Types
::
DesignManagement
::
DesignType
.
connection_type
,
null:
false
,
description:
'All designs that were changed in the version'
field
:designs_at_version
,
::
Types
::
DesignManagement
::
DesignAtVersionType
.
connection_type
,
null:
false
,
description:
'All designs that are visible at this version, as of this version'
,
resolver:
::
Resolvers
::
DesignManagement
::
Version
::
DesignsAtVersionResolver
field
:design_at_version
,
::
Types
::
DesignManagement
::
DesignAtVersionType
,
null:
false
,
description:
'A particular design as of this version, provided it is visible at this version'
,
resolver:
::
Resolvers
::
DesignManagement
::
Version
::
DesignsAtVersionResolver
.
single
end
end
end
ee/spec/graphql/types/design_management/version_type_spec.rb
View file @
da30fdb5
...
...
@@ -3,7 +3,11 @@
require
'spec_helper'
describe
GitlabSchema
.
types
[
'DesignVersion'
]
do
let
(
:expected_fields
)
do
%i[id sha designs design_at_version designs_at_version]
end
it
{
expect
(
described_class
).
to
require_graphql_authorizations
(
:read_design
)
}
it
{
expect
(
described_class
).
to
have_graphql_fields
(
:id
,
:sha
,
:design
s
)
}
it
{
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_field
s
)
}
end
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