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
590e63c3
Commit
590e63c3
authored
Mar 26, 2020
by
rpereira2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add state attribute to environment graphql API
parent
5003b5eb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
1 deletion
+28
-1
app/graphql/types/environment_type.rb
app/graphql/types/environment_type.rb
+3
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+5
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+18
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-0
spec/graphql/types/environment_type_spec.rb
spec/graphql/types/environment_type_spec.rb
+1
-1
No files found.
app/graphql/types/environment_type.rb
View file @
590e63c3
...
...
@@ -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
doc/api/graphql/reference/gitlab_schema.graphql
View file @
590e63c3
...
...
@@ -1869,6 +1869,11 @@ type Environment {
Human
-
readable
name
of
the
environment
"""
name
:
String
!
"""
State
of
the
environment
,
for
example
:
available
/
stopped
"""
state
:
String
!
}
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
590e63c3
...
...
@@ -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"
,
...
...
doc/api/graphql/reference/index.md
View file @
590e63c3
...
...
@@ -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
...
...
spec/graphql/types/environment_type_spec.rb
View file @
590e63c3
...
...
@@ -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
)
...
...
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