Commit 88f935cb authored by Kerri Miller's avatar Kerri Miller

Merge branch 'lm-update-w-connections-graphql' into 'master'

Add connection type to ci config fields

See merge request gitlab-org/gitlab!50160
parents f589d1a8 90558f87
...@@ -11,7 +11,7 @@ module Types ...@@ -11,7 +11,7 @@ module Types
description: 'Linting errors' description: 'Linting errors'
field :merged_yaml, GraphQL::STRING_TYPE, null: true, field :merged_yaml, GraphQL::STRING_TYPE, null: true,
description: 'Merged CI config YAML' description: 'Merged CI config YAML'
field :stages, [Types::Ci::Config::StageType], null: true, field :stages, Types::Ci::Config::StageType.connection_type, null: true,
description: 'Stages of the pipeline' description: 'Stages of the pipeline'
field :status, Types::Ci::Config::StatusEnum, null: true, field :status, Types::Ci::Config::StatusEnum, null: true,
description: 'Status of linting, can be either valid or invalid' description: 'Status of linting, can be either valid or invalid'
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
field :name, GraphQL::STRING_TYPE, null: true, field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the job group' description: 'Name of the job group'
field :jobs, [Types::Ci::Config::JobType], null: true, field :jobs, Types::Ci::Config::JobType.connection_type, null: true,
description: 'Jobs in group' description: 'Jobs in group'
field :size, GraphQL::INT_TYPE, null: true, field :size, GraphQL::INT_TYPE, null: true,
description: 'Size of the job group' description: 'Size of the job group'
......
...@@ -13,7 +13,7 @@ module Types ...@@ -13,7 +13,7 @@ module Types
description: 'Name of the job group' description: 'Name of the job group'
field :stage, GraphQL::STRING_TYPE, null: true, field :stage, GraphQL::STRING_TYPE, null: true,
description: 'Name of the job stage' description: 'Name of the job stage'
field :needs, [Types::Ci::Config::NeedType], null: true, field :needs, Types::Ci::Config::NeedType.connection_type, null: true,
description: 'Builds that must complete before the jobs run' description: 'Builds that must complete before the jobs run'
end end
end end
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
field :name, GraphQL::STRING_TYPE, null: true, field :name, GraphQL::STRING_TYPE, null: true,
description: 'Name of the stage' description: 'Name of the stage'
field :groups, [Types::Ci::Config::GroupType], null: true, field :groups, Types::Ci::Config::GroupType.connection_type, null: true,
description: 'Groups of jobs for the stage' description: 'Groups of jobs for the stage'
end end
end end
......
---
title: Update ci config type for GraphQL to use connection_type
merge_request: 50160
author:
type: changed
...@@ -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
""" """
......
...@@ -6125,6 +6125,198 @@ ...@@ -6125,6 +6125,198 @@
{ {
"name": "stages", "name": "stages",
"description": "Stages of the pipeline", "description": "Stages of the pipeline",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "CiConfigStageConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "status",
"description": "Status of linting, can be either valid or invalid",
"args": [
],
"type": {
"kind": "ENUM",
"name": "CiConfigStatus",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "CiConfigGroup",
"description": null,
"fields": [
{
"name": "jobs",
"description": "Jobs in group",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "CiConfigJobConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "name",
"description": "Name of the job group",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "size",
"description": "Size of the job group",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "CiConfigGroupConnection",
"description": "The connection type for CiConfigGroup.",
"fields": [
{
"name": "edges",
"description": "A list of edges.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "CiConfigGroupEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [ "args": [
], ],
...@@ -6132,28 +6324,248 @@ ...@@ -6132,28 +6324,248 @@
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
"ofType": { "ofType": {
"kind": "OBJECT",
"name": "CiConfigGroup",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "CiConfigGroupEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
"ofType": { "ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigStage", "name": "CiConfigGroup",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "CiConfigJob",
"description": null,
"fields": [
{
"name": "groupName",
"description": "Name of the job group",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "name",
"description": "Name of the job",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "needs",
"description": "Builds that must complete before the jobs run",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "CiConfigNeedConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "stage",
"description": "Name of the job stage",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "CiConfigJobConnection",
"description": "The connection type for CiConfigJob.",
"fields": [
{
"name": "edges",
"description": "A list of edges.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "CiConfigJobEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "CiConfigJob",
"ofType": null "ofType": null
} }
}
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "status", "name": "pageInfo",
"description": "Status of linting, can be either valid or invalid", "description": "Information to aid in pagination.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "ENUM", "kind": "NON_NULL",
"name": "CiConfigStatus", "name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null "ofType": null
}
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
...@@ -6168,54 +6580,63 @@ ...@@ -6168,54 +6580,63 @@
}, },
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigGroup", "name": "CiConfigJobEdge",
"description": null, "description": "An edge in a connection.",
"fields": [ "fields": [
{ {
"name": "jobs", "name": "cursor",
"description": "Jobs in group", "description": "A cursor for use in pagination.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
"ofType": { "ofType": {
"kind": "OBJECT", "kind": "SCALAR",
"name": "CiConfigJob", "name": "String",
"ofType": null "ofType": null
} }
}
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "name", "name": "node",
"description": "Name of the job group", "description": "The item at the end of the edge.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "SCALAR", "kind": "OBJECT",
"name": "String", "name": "CiConfigJob",
"ofType": null "ofType": null
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
}, },
{ {
"name": "size", "kind": "OBJECT",
"description": "Size of the job group", "name": "CiConfigNeed",
"description": null,
"fields": [
{
"name": "name",
"description": "Name of the need",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "Int", "name": "String",
"ofType": null "ofType": null
}, },
"isDeprecated": false, "isDeprecated": false,
...@@ -6231,69 +6652,104 @@ ...@@ -6231,69 +6652,104 @@
}, },
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigJob", "name": "CiConfigNeedConnection",
"description": null, "description": "The connection type for CiConfigNeed.",
"fields": [ "fields": [
{ {
"name": "groupName", "name": "edges",
"description": "Name of the job group", "description": "A list of edges.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "SCALAR", "kind": "LIST",
"name": "String", "name": null,
"ofType": {
"kind": "OBJECT",
"name": "CiConfigNeedEdge",
"ofType": null "ofType": null
}
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "name", "name": "nodes",
"description": "Name of the job", "description": "A list of nodes.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "SCALAR", "kind": "LIST",
"name": "String", "name": null,
"ofType": {
"kind": "OBJECT",
"name": "CiConfigNeed",
"ofType": null "ofType": null
}
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "needs", "name": "pageInfo",
"description": "Builds that must complete before the jobs run", "description": "Information to aid in pagination.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
"ofType": { "ofType": {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigNeed", "name": "PageInfo",
"ofType": null "ofType": null
} }
}
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
}, },
{ {
"name": "stage", "kind": "OBJECT",
"description": "Name of the job stage", "name": "CiConfigNeedEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
"ofType": null "ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "CiConfigNeed",
"ofType": null
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
...@@ -6308,12 +6764,65 @@ ...@@ -6308,12 +6764,65 @@
}, },
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigNeed", "name": "CiConfigStage",
"description": null, "description": null,
"fields": [ "fields": [
{
"name": "groups",
"description": "Groups of jobs for the stage",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "CiConfigGroupConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{ {
"name": "name", "name": "name",
"description": "Name of the need", "description": "Name of the stage",
"args": [ "args": [
], ],
...@@ -6335,12 +6844,12 @@ ...@@ -6335,12 +6844,12 @@
}, },
{ {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigStage", "name": "CiConfigStageConnection",
"description": null, "description": "The connection type for CiConfigStage.",
"fields": [ "fields": [
{ {
"name": "groups", "name": "edges",
"description": "Groups of jobs for the stage", "description": "A list of edges.",
"args": [ "args": [
], ],
...@@ -6348,28 +6857,91 @@ ...@@ -6348,28 +6857,91 @@
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
"ofType": { "ofType": {
"kind": "NON_NULL", "kind": "OBJECT",
"name": "CiConfigStageEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [
],
"type": {
"kind": "LIST",
"name": null, "name": null,
"ofType": { "ofType": {
"kind": "OBJECT", "kind": "OBJECT",
"name": "CiConfigGroup", "name": "CiConfigStage",
"ofType": null "ofType": null
} }
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
} }
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
}, },
{ {
"name": "name", "kind": "OBJECT",
"description": "Name of the stage", "name": "CiConfigStageEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [ "args": [
], ],
"type": { "type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
"ofType": null "ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "CiConfigStage",
"ofType": null
}, },
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
...@@ -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` | CiConfigStageConnection | 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` | CiConfigJobConnection | 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` | CiConfigNeedConnection | 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` | CiConfigGroupConnection | Groups of jobs for the stage |
| `name` | String | Name of the stage | | `name` | String | Name of the stage |
### CiGroup ### CiGroup
......
...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment