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
dc0576aa
Commit
dc0576aa
authored
Nov 26, 2020
by
Natalia Tepluhina
Committed by
David O'Regan
Nov 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance Improvements for the Epic View: GraphQL startupjs
parent
0974d0a5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
135 additions
and
110 deletions
+135
-110
app/graphql/queries/epic/epic_children.query.graphql
app/graphql/queries/epic/epic_children.query.graphql
+126
-0
app/graphql/queries/epic/epic_details.query.graphql
app/graphql/queries/epic/epic_details.query.graphql
+5
-0
ee/app/assets/javascripts/epic/store/actions.js
ee/app/assets/javascripts/epic/store/actions.js
+1
-1
ee/app/assets/javascripts/related_items_tree/queries/epic.fragment.graphql
...ascripts/related_items_tree/queries/epic.fragment.graphql
+0
-36
ee/app/assets/javascripts/related_items_tree/queries/epicChildren.query.graphql
...pts/related_items_tree/queries/epicChildren.query.graphql
+0
-41
ee/app/assets/javascripts/related_items_tree/queries/issue.fragment.graphql
...scripts/related_items_tree/queries/issue.fragment.graphql
+0
-31
ee/app/assets/javascripts/related_items_tree/store/actions.js
...pp/assets/javascripts/related_items_tree/store/actions.js
+1
-1
ee/app/views/groups/epics/show.html.haml
ee/app/views/groups/epics/show.html.haml
+2
-0
No files found.
app/graphql/queries/epic/epic_children.query.graphql
0 → 100644
View file @
dc0576aa
fragment
PageInfo
on
PageInfo
{
hasNextPage
hasPreviousPage
startCursor
endCursor
}
fragment
RelatedTreeBaseEpic
on
Epic
{
id
iid
title
webPath
relativePosition
userPermissions
{
__typename
adminEpic
createEpic
}
descendantCounts
{
__typename
openedEpics
closedEpics
openedIssues
closedIssues
}
healthStatus
{
__typename
issuesAtRisk
issuesOnTrack
issuesNeedingAttention
}
}
fragment
EpicNode
on
Epic
{
...
RelatedTreeBaseEpic
state
reference
(
full
:
true
)
relationPath
createdAt
closedAt
hasChildren
hasIssues
group
{
__typename
fullPath
}
}
query
childItems
(
$fullPath
:
ID
!
$iid
:
ID
$pageSize
:
Int
=
100
$epicEndCursor
:
String
=
""
$issueEndCursor
:
String
=
""
)
{
group
(
fullPath
:
$fullPath
)
{
__typename
id
path
fullPath
epic
(
iid
:
$iid
)
{
__typename
...
RelatedTreeBaseEpic
children
(
first
:
$pageSize
,
after
:
$epicEndCursor
)
{
__typename
edges
{
__typename
node
{
__typename
...
EpicNode
}
}
pageInfo
{
__typename
...
PageInfo
}
}
issues
(
first
:
$pageSize
,
after
:
$issueEndCursor
)
{
__typename
edges
{
__typename
node
{
__typename
iid
epicIssueId
title
closedAt
state
createdAt
confidential
dueDate
weight
webPath
reference
(
full
:
true
)
relationPath
relativePosition
assignees
{
__typename
edges
{
__typename
node
{
__typename
webUrl
name
username
avatarUrl
}
}
}
milestone
{
__typename
title
startDate
dueDate
}
healthStatus
}
}
pageInfo
{
__typename
...
PageInfo
}
}
}
}
}
ee/app/assets/javascripts/epic/queries/epicD
etails.query.graphql
→
app/graphql/queries/epic/epic_d
etails.query.graphql
View file @
dc0576aa
query
epicDetails
(
$fullPath
:
ID
!,
$iid
:
ID
!)
{
query
epicDetails
(
$fullPath
:
ID
!,
$iid
:
ID
!)
{
group
(
fullPath
:
$fullPath
)
{
group
(
fullPath
:
$fullPath
)
{
__typename
epic
(
iid
:
$iid
)
{
epic
(
iid
:
$iid
)
{
__typename
participants
{
participants
{
__typename
edges
{
edges
{
__typename
node
{
node
{
__typename
name
name
avatarUrl
avatarUrl
webUrl
webUrl
...
...
ee/app/assets/javascripts/epic/store/actions.js
View file @
dc0576aa
import
epicDetailsQuery
from
'
shared_queries/epic/epic_details.query.graphql
'
;
import
{
deprecatedCreateFlash
as
flash
}
from
'
~/flash
'
;
import
{
deprecatedCreateFlash
as
flash
}
from
'
~/flash
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
@@ -6,7 +7,6 @@ import { __, s__, sprintf } from '~/locale';
...
@@ -6,7 +7,6 @@ import { __, s__, sprintf } from '~/locale';
import
{
statusType
,
statusEvent
,
dateTypes
}
from
'
../constants
'
;
import
{
statusType
,
statusEvent
,
dateTypes
}
from
'
../constants
'
;
import
epicDetailsQuery
from
'
../queries/epicDetails.query.graphql
'
;
import
epicSetSubscription
from
'
../queries/epicSetSubscription.mutation.graphql
'
;
import
epicSetSubscription
from
'
../queries/epicSetSubscription.mutation.graphql
'
;
import
updateEpic
from
'
../queries/updateEpic.mutation.graphql
'
;
import
updateEpic
from
'
../queries/updateEpic.mutation.graphql
'
;
import
epicUtils
from
'
../utils/epic_utils
'
;
import
epicUtils
from
'
../utils/epic_utils
'
;
...
...
ee/app/assets/javascripts/related_items_tree/queries/epic.fragment.graphql
deleted
100644 → 0
View file @
0974d0a5
fragment
RelatedTreeBaseEpic
on
Epic
{
id
iid
title
webPath
relativePosition
userPermissions
{
adminEpic
createEpic
}
descendantCounts
{
openedEpics
closedEpics
openedIssues
closedIssues
}
healthStatus
{
issuesAtRisk
issuesOnTrack
issuesNeedingAttention
}
}
fragment
EpicNode
on
Epic
{
...
RelatedTreeBaseEpic
state
reference
(
full
:
true
)
relationPath
createdAt
closedAt
hasChildren
hasIssues
group
{
fullPath
}
}
ee/app/assets/javascripts/related_items_tree/queries/epicChildren.query.graphql
deleted
100644 → 0
View file @
0974d0a5
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "./epic.fragment.graphql"
#import "./issue.fragment.graphql"
query
childItems
(
$fullPath
:
ID
!
$iid
:
ID
$pageSize
:
Int
=
100
$epicEndCursor
:
String
=
""
$issueEndCursor
:
String
=
""
)
{
group
(
fullPath
:
$fullPath
)
{
id
path
fullPath
epic
(
iid
:
$iid
)
{
...
RelatedTreeBaseEpic
children
(
first
:
$pageSize
,
after
:
$epicEndCursor
)
{
edges
{
node
{
...
EpicNode
}
}
pageInfo
{
...
PageInfo
}
}
issues
(
first
:
$pageSize
,
after
:
$issueEndCursor
)
{
edges
{
node
{
...
IssueNode
}
}
pageInfo
{
...
PageInfo
}
}
}
}
}
ee/app/assets/javascripts/related_items_tree/queries/issue.fragment.graphql
deleted
100644 → 0
View file @
0974d0a5
fragment
IssueNode
on
EpicIssue
{
iid
epicIssueId
title
closedAt
state
createdAt
confidential
dueDate
weight
webPath
reference
(
full
:
true
)
relationPath
relativePosition
assignees
{
edges
{
node
{
webUrl
name
username
avatarUrl
}
}
}
milestone
{
title
startDate
dueDate
}
healthStatus
}
ee/app/assets/javascripts/related_items_tree/store/actions.js
View file @
dc0576aa
import
Api
from
'
ee/api
'
;
import
Api
from
'
ee/api
'
;
import
epicChildren
from
'
shared_queries/epic/epic_children.query.graphql
'
;
import
{
deprecatedCreateFlash
as
flash
}
from
'
~/flash
'
;
import
{
deprecatedCreateFlash
as
flash
}
from
'
~/flash
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
...
@@ -13,7 +14,6 @@ import {
...
@@ -13,7 +14,6 @@ import {
import
{
ChildType
,
ChildState
,
idProp
,
relativePositions
}
from
'
../constants
'
;
import
{
ChildType
,
ChildState
,
idProp
,
relativePositions
}
from
'
../constants
'
;
import
epicChildren
from
'
../queries/epicChildren.query.graphql
'
;
import
epicChildReorder
from
'
../queries/epicChildReorder.mutation.graphql
'
;
import
epicChildReorder
from
'
../queries/epicChildReorder.mutation.graphql
'
;
import
{
processQueryResponse
,
formatChildItem
,
gqClient
}
from
'
../utils/epic_utils
'
;
import
{
processQueryResponse
,
formatChildItem
,
gqClient
}
from
'
../utils/epic_utils
'
;
...
...
ee/app/views/groups/epics/show.html.haml
View file @
dc0576aa
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
-
add_page_specific_style
'page_bundles/roadmap'
-
add_page_specific_style
'page_bundles/roadmap'
-
add_page_startup_api_call
discussions_path
(
@epic
)
-
add_page_startup_api_call
discussions_path
(
@epic
)
-
add_page_startup_graphql_call
(
'epic/epic_details'
,
{
fullPath:
@group
.
full_path
,
iid:
@epic
.
iid
})
-
add_page_startup_graphql_call
(
'epic/epic_children'
,
{
fullPath:
@group
.
full_path
,
iid:
@epic
.
iid
,
pageSize:
100
,
epicEndCursor:
''
,
issueEndCursor:
''
})
#epic-app-root
{
data:
epic_show_app_data
(
@epic
),
#epic-app-root
{
data:
epic_show_app_data
(
@epic
),
'data-allow-sub-epics'
=>
allow_sub_epics
}
'data-allow-sub-epics'
=>
allow_sub_epics
}
...
...
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