Commit 590e63c3 authored by rpereira2's avatar rpereira2

Add state attribute to environment graphql API

parent 5003b5eb
......@@ -12,5 +12,8 @@ module Types
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the environment'
field :state, GraphQL::STRING_TYPE, null: false,
description: 'State of the environment, for example: available/stopped'
end
end
......@@ -1869,6 +1869,11 @@ type Environment {
Human-readable name of the environment
"""
name: String!
"""
State of the environment, for example: available/stopped
"""
state: String!
}
"""
......
......@@ -5530,6 +5530,24 @@
"description": "Human-readable name of the environment",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "state",
"description": "State of the environment, for example: available/stopped",
"args": [
],
"type": {
"kind": "NON_NULL",
......
......@@ -318,6 +318,7 @@ Describes where code is deployed for a project
| --- | ---- | ---------- |
| `id` | ID! | ID of the environment |
| `name` | String! | Human-readable name of the environment |
| `state` | String! | State of the environment, for example: available/stopped |
## Epic
......
......@@ -7,7 +7,7 @@ describe GitlabSchema.types['Environment'] do
it 'has the expected fields' do
expected_fields = %w[
name id
name id state
]
expect(described_class).to have_graphql_fields(*expected_fields)
......
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