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
32f5c0f7
Commit
32f5c0f7
authored
Mar 04, 2021
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose enough shifts records to fill a schedule
parent
500aa483
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
ee/app/graphql/types/incident_management/oncall_rotation_type.rb
...graphql/types/incident_management/oncall_rotation_type.rb
+3
-0
ee/spec/graphql/types/incident_management/oncall_rotation_type_spec.rb
...ql/types/incident_management/oncall_rotation_type_spec.rb
+5
-0
No files found.
ee/app/graphql/types/incident_management/oncall_rotation_type.rb
View file @
32f5c0f7
...
...
@@ -3,6 +3,8 @@
module
Types
module
IncidentManagement
class
OncallRotationType
<
BaseObject
MAX_SHIFTS_FOR_TIMEFRAME
=
350
graphql_name
'IncidentManagementOncallRotation'
description
'Describes an incident management on-call rotation'
...
...
@@ -52,6 +54,7 @@ module Types
::
Types
::
IncidentManagement
::
OncallShiftType
.
connection_type
,
null:
true
,
description:
'Blocks of time for which a participant is on-call within a given time frame. Time frame cannot exceed one month.'
,
max_page_size:
MAX_SHIFTS_FOR_TIMEFRAME
,
resolver:
::
Resolvers
::
IncidentManagement
::
OncallShiftsResolver
end
end
...
...
ee/spec/graphql/types/incident_management/oncall_rotation_type_spec.rb
View file @
32f5c0f7
...
...
@@ -22,4 +22,9 @@ RSpec.describe GitlabSchema.types['IncidentManagementOncallRotation'] do
expect
(
described_class
).
to
have_graphql_fields
(
*
expected_fields
)
end
it
'returns enough records to cover 2 weeks of hour-long shifts'
do
expect
(
described_class
::
MAX_SHIFTS_FOR_TIMEFRAME
).
to
be
>
14
*
24
# 14 days * 24 hours
expect
(
described_class
).
to
have_graphql_field
(
:shifts
,
max_page_size:
described_class
::
MAX_SHIFTS_FOR_TIMEFRAME
)
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