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
90558f87
Commit
90558f87
authored
Dec 21, 2020
by
lauraMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates existing specs
* Updates schema and docs * Adds a changelog
parent
2fcf71d0
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
948 additions
and
125 deletions
+948
-125
changelogs/unreleased/lm-update-w-connections-graphql.yml
changelogs/unreleased/lm-update-w-connections-graphql.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+224
-4
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+652
-80
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+4
-4
spec/requests/api/graphql/ci/config_spec.rb
spec/requests/api/graphql/ci/config_spec.rb
+63
-37
No files found.
changelogs/unreleased/lm-update-w-connections-graphql.yml
0 → 100644
View file @
90558f87
---
title
:
Update ci config type for GraphQL to use connection_type
merge_request
:
50160
author
:
type
:
changed
doc/api/graphql/reference/gitlab_schema.graphql
View file @
90558f87
...
@@ -2291,7 +2291,27 @@ type CiConfig {
...
@@ -2291,7 +2291,27 @@ type CiConfig {
"""
"""
Stages
of
the
pipeline
Stages
of
the
pipeline
"""
"""
stages
:
[
CiConfigStage
!]
stages
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigStageConnection
"""
"""
Status
of
linting
,
can
be
either
valid
or
invalid
Status
of
linting
,
can
be
either
valid
or
invalid
...
@@ -2303,7 +2323,27 @@ type CiConfigGroup {
...
@@ -2303,7 +2323,27 @@ type CiConfigGroup {
"""
"""
Jobs
in
group
Jobs
in
group
"""
"""
jobs
:
[
CiConfigJob
!]
jobs
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigJobConnection
"""
"""
Name
of
the
job
group
Name
of
the
job
group
...
@@ -2316,6 +2356,41 @@ type CiConfigGroup {
...
@@ -2316,6 +2356,41 @@ type CiConfigGroup {
size
:
Int
size
:
Int
}
}
"""
The connection type for CiConfigGroup.
"""
type
CiConfigGroupConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigGroupEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigGroup
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigGroupEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigGroup
}
type
CiConfigJob
{
type
CiConfigJob
{
"""
"""
Name
of
the
job
group
Name
of
the
job
group
...
@@ -2330,7 +2405,27 @@ type CiConfigJob {
...
@@ -2330,7 +2405,27 @@ type CiConfigJob {
"""
"""
Builds
that
must
complete
before
the
jobs
run
Builds
that
must
complete
before
the
jobs
run
"""
"""
needs
:
[
CiConfigNeed
!]
needs
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigNeedConnection
"""
"""
Name
of
the
job
stage
Name
of
the
job
stage
...
@@ -2338,6 +2433,41 @@ type CiConfigJob {
...
@@ -2338,6 +2433,41 @@ type CiConfigJob {
stage
:
String
stage
:
String
}
}
"""
The connection type for CiConfigJob.
"""
type
CiConfigJobConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigJobEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigJob
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigJobEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigJob
}
type
CiConfigNeed
{
type
CiConfigNeed
{
"""
"""
Name
of
the
need
Name
of
the
need
...
@@ -2345,11 +2475,66 @@ type CiConfigNeed {
...
@@ -2345,11 +2475,66 @@ type CiConfigNeed {
name
:
String
name
:
String
}
}
"""
The connection type for CiConfigNeed.
"""
type
CiConfigNeedConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigNeedEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigNeed
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigNeedEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigNeed
}
type
CiConfigStage
{
type
CiConfigStage
{
"""
"""
Groups
of
jobs
for
the
stage
Groups
of
jobs
for
the
stage
"""
"""
groups
:
[
CiConfigGroup
!]
groups
(
"""
Returns
the
elements
in
the
list
that
come
after
the
specified
cursor
.
"""
after
:
String
"""
Returns
the
elements
in
the
list
that
come
before
the
specified
cursor
.
"""
before
:
String
"""
Returns
the
first
_n_
elements
from
the
list
.
"""
first
:
Int
"""
Returns
the
last
_n_
elements
from
the
list
.
"""
last
:
Int
):
CiConfigGroupConnection
"""
"""
Name
of
the
stage
Name
of
the
stage
...
@@ -2357,6 +2542,41 @@ type CiConfigStage {
...
@@ -2357,6 +2542,41 @@ type CiConfigStage {
name
:
String
name
:
String
}
}
"""
The connection type for CiConfigStage.
"""
type
CiConfigStageConnection
{
"""
A
list
of
edges
.
"""
edges
:
[
CiConfigStageEdge
]
"""
A
list
of
nodes
.
"""
nodes
:
[
CiConfigStage
]
"""
Information
to
aid
in
pagination
.
"""
pageInfo
:
PageInfo
!
}
"""
An edge in a connection.
"""
type
CiConfigStageEdge
{
"""
A
cursor
for
use
in
pagination
.
"""
cursor
:
String
!
"""
The
item
at
the
end
of
the
edge
.
"""
node
:
CiConfigStage
}
"""
"""
Values for YAML processor result
Values for YAML processor result
"""
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
90558f87
This diff is collapsed.
Click to expand it.
doc/api/graphql/reference/index.md
View file @
90558f87
...
@@ -381,14 +381,14 @@ Represents the total number of issues and their weights for a particular day.
...
@@ -381,14 +381,14 @@ Represents the total number of issues and their weights for a particular day.
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`errors`
| String! => Array | Linting errors |
|
`errors`
| String! => Array | Linting errors |
|
`mergedYaml`
| String | Merged CI config YAML |
|
`mergedYaml`
| String | Merged CI config YAML |
|
`stages`
| CiConfigStage
! => Array
| Stages of the pipeline |
|
`stages`
| CiConfigStage
Connection
| Stages of the pipeline |
|
`status`
| CiConfigStatus | Status of linting, can be either valid or invalid |
|
`status`
| CiConfigStatus | Status of linting, can be either valid or invalid |
### CiConfigGroup
### CiConfigGroup
| Field | Type | Description |
| Field | Type | Description |
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`jobs`
| CiConfigJob
! => Array
| Jobs in group |
|
`jobs`
| CiConfigJob
Connection
| Jobs in group |
|
`name`
| String | Name of the job group |
|
`name`
| String | Name of the job group |
|
`size`
| Int | Size of the job group |
|
`size`
| Int | Size of the job group |
...
@@ -398,7 +398,7 @@ Represents the total number of issues and their weights for a particular day.
...
@@ -398,7 +398,7 @@ Represents the total number of issues and their weights for a particular day.
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`groupName`
| String | Name of the job group |
|
`groupName`
| String | Name of the job group |
|
`name`
| String | Name of the job |
|
`name`
| String | Name of the job |
|
`needs`
| CiConfigNeed
! => Array
| Builds that must complete before the jobs run |
|
`needs`
| CiConfigNeed
Connection
| Builds that must complete before the jobs run |
|
`stage`
| String | Name of the job stage |
|
`stage`
| String | Name of the job stage |
### CiConfigNeed
### CiConfigNeed
...
@@ -411,7 +411,7 @@ Represents the total number of issues and their weights for a particular day.
...
@@ -411,7 +411,7 @@ Represents the total number of issues and their weights for a particular day.
| Field | Type | Description |
| Field | Type | Description |
| ----- | ---- | ----------- |
| ----- | ---- | ----------- |
|
`groups`
| CiConfigGroup
! => Array
| Groups of jobs for the stage |
|
`groups`
| CiConfigGroup
Connection
| Groups of jobs for the stage |
|
`name`
| String | Name of the stage |
|
`name`
| String | Name of the stage |
### CiGroup
### CiGroup
...
...
spec/requests/api/graphql/ci/config_spec.rb
View file @
90558f87
...
@@ -20,15 +20,19 @@ RSpec.describe 'Query.ciConfig' do
...
@@ -20,15 +20,19 @@ RSpec.describe 'Query.ciConfig' do
status
status
errors
errors
stages {
stages {
nodes {
name
name
groups {
groups {
nodes {
name
name
size
size
jobs {
jobs {
nodes {
name
name
groupName
groupName
stage
stage
needs {
needs {
nodes {
name
name
}
}
}
}
...
@@ -36,6 +40,10 @@ RSpec.describe 'Query.ciConfig' do
...
@@ -36,6 +40,10 @@ RSpec.describe 'Query.ciConfig' do
}
}
}
}
}
}
}
}
}
}
)
)
end
end
...
@@ -50,42 +58,60 @@ RSpec.describe 'Query.ciConfig' do
...
@@ -50,42 +58,60 @@ RSpec.describe 'Query.ciConfig' do
"status"
=>
"VALID"
,
"status"
=>
"VALID"
,
"errors"
=>
[],
"errors"
=>
[],
"stages"
=>
"stages"
=>
{
"nodes"
=>
[
[
{
{
"name"
=>
"build"
,
"name"
=>
"build"
,
"groups"
=>
"groups"
=>
{
"nodes"
=>
[
[
{
{
"name"
=>
"rspec"
,
"name"
=>
"rspec"
,
"size"
=>
2
,
"size"
=>
2
,
"jobs"
=>
"jobs"
=>
{
"nodes"
=>
[
[
{
"name"
=>
"rspec 0 1"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
[]
},
{
"name"
=>
"rspec 0 1"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
{
"nodes"
=>
[]
}
},
{
"name"
=>
"rspec 0 2"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
[]
}
{
"name"
=>
"rspec 0 2"
,
"groupName"
=>
"rspec"
,
"stage"
=>
"build"
,
"needs"
=>
{
"nodes"
=>
[]
}
}
]
]
}
},
},
{
{
"name"
=>
"spinach"
,
"size"
=>
1
,
"jobs"
=>
"name"
=>
"spinach"
,
"size"
=>
1
,
"jobs"
=>
{
"nodes"
=>
[
[
{
"name"
=>
"spinach"
,
"groupName"
=>
"spinach"
,
"stage"
=>
"build"
,
"needs"
=>
[]
}
{
"name"
=>
"spinach"
,
"groupName"
=>
"spinach"
,
"stage"
=>
"build"
,
"needs"
=>
{
"nodes"
=>
[]
}
}
]
]
}
}
}
]
]
}
},
},
{
{
"name"
=>
"test"
,
"name"
=>
"test"
,
"groups"
=>
"groups"
=>
{
"nodes"
=>
[
[
{
{
"name"
=>
"docker"
,
"name"
=>
"docker"
,
"size"
=>
1
,
"size"
=>
1
,
"jobs"
=>
[
"jobs"
=>
{
"name"
=>
"docker"
,
"groupName"
=>
"docker"
,
"stage"
=>
"test"
,
"needs"
=>
[{
"name"
=>
"spinach"
},
{
"name"
=>
"rspec 0 1"
}]
}
{
"nodes"
=>
[
{
"name"
=>
"docker"
,
"groupName"
=>
"docker"
,
"stage"
=>
"test"
,
"needs"
=>
{
"nodes"
=>
[{
"name"
=>
"spinach"
},
{
"name"
=>
"rspec 0 1"
}]
}
}
]
]
}
}
}
]
]
}
}
}
]
]
}
)
)
end
end
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