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
7d4cc076
Commit
7d4cc076
authored
Dec 05, 2019
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Connect designs-at-versions to design-collections
This mounts the new resolvers on the design collection type
parent
da30fdb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
10 deletions
+32
-10
ee/app/graphql/types/design_management/design_collection_type.rb
...graphql/types/design_management/design_collection_type.rb
+22
-4
ee/spec/graphql/types/design_management/design_collection_type_spec.rb
...ql/types/design_management/design_collection_type_spec.rb
+5
-1
ee/spec/graphql/types/design_management/version_type_spec.rb
ee/spec/graphql/types/design_management/version_type_spec.rb
+5
-5
No files found.
ee/app/graphql/types/design_management/design_collection_type.rb
View file @
7d4cc076
...
...
@@ -12,14 +12,32 @@ module Types
description:
'Project associated with the design collection'
field
:issue
,
Types
::
IssueType
,
null:
false
,
description:
'Issue associated with the design collection'
field
:designs
,
Types
::
DesignManagement
::
DesignType
.
connection_type
,
null:
false
,
field
:designs
,
Types
::
DesignManagement
::
DesignType
.
connection_type
,
null:
false
,
resolver:
Resolvers
::
DesignManagement
::
DesignsResolver
,
description:
'All designs for the design collection'
# TODO: allow getting a single design by filename
# exposing all designs
field
:versions
,
Types
::
DesignManagement
::
VersionType
.
connection_type
,
field
:versions
,
Types
::
DesignManagement
::
VersionType
.
connection_type
,
resolver:
Resolvers
::
DesignManagement
::
VersionsResolver
,
description:
'All versions related to all designs, ordered newest first'
field
:version
,
Types
::
DesignManagement
::
VersionType
,
resolver:
Resolvers
::
DesignManagement
::
VersionsResolver
.
single
,
description:
'A specific version'
field
:design_at_version
,
::
Types
::
DesignManagement
::
DesignAtVersionType
,
null:
true
,
resolver:
::
Resolvers
::
DesignManagement
::
DesignAtVersionResolver
,
description:
'Find a design as of a version'
field
:design
,
::
Types
::
DesignManagement
::
DesignType
,
null:
true
,
resolver:
::
Resolvers
::
DesignManagement
::
DesignResolver
,
description:
'Find a specific design'
end
end
end
ee/spec/graphql/types/design_management/design_collection_type_spec.rb
View file @
7d4cc076
...
...
@@ -5,5 +5,9 @@ require 'spec_helper'
describe
GitlabSchema
.
types
[
'DesignCollection'
]
do
it
{
expect
(
described_class
).
to
require_graphql_authorizations
(
:read_design
)
}
it
{
expect
(
described_class
).
to
have_graphql_fields
(
:project
,
:issue
,
:designs
,
:versions
)
}
it
'has the expected fields'
do
expected_fields
=
%i[project issue designs versions version designAtVersion design]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
end
end
ee/spec/graphql/types/design_management/version_type_spec.rb
View file @
7d4cc076
...
...
@@ -3,11 +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
(
*
expected_fields
)
}
it
'has the expected fields'
do
expected_fields
=
%i[id sha designs design_at_version designs_at_version]
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
end
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