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
ade086ac
Commit
ade086ac
authored
Aug 11, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GraphQL query example indentation in specs
Use consistent indentation for query examples across GraphQL specs
parent
289cc8a8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
78 additions
and
78 deletions
+78
-78
ee/spec/graphql/ee/types/group_type_spec.rb
ee/spec/graphql/ee/types/group_type_spec.rb
+1
-1
ee/spec/graphql/types/project_type_spec.rb
ee/spec/graphql/types/project_type_spec.rb
+9
-9
ee/spec/graphql/types/vulnerability_type_spec.rb
ee/spec/graphql/types/vulnerability_type_spec.rb
+1
-1
ee/spec/requests/api/graphql/epics/epic_resolver_spec.rb
ee/spec/requests/api/graphql/epics/epic_resolver_spec.rb
+7
-7
ee/spec/requests/api/graphql/project/pipeline/security_report_summary_spec.rb
.../graphql/project/pipeline/security_report_summary_spec.rb
+2
-2
ee/spec/requests/api/graphql/project/vulnerability_severities_count_spec.rb
...pi/graphql/project/vulnerability_severities_count_spec.rb
+1
-1
spec/graphql/types/issue_type_spec.rb
spec/graphql/types/issue_type_spec.rb
+6
-6
spec/graphql/types/project_type_spec.rb
spec/graphql/types/project_type_spec.rb
+29
-29
spec/graphql/types/snippets/blob_viewer_type_spec.rb
spec/graphql/types/snippets/blob_viewer_type_spec.rb
+2
-2
spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb
...equests/api/graphql/metrics/dashboard/annotations_spec.rb
+11
-11
spec/requests/api/graphql/project/jira_import_spec.rb
spec/requests/api/graphql/project/jira_import_spec.rb
+2
-2
spec/requests/api/graphql/project_query_spec.rb
spec/requests/api/graphql/project_query_spec.rb
+7
-7
No files found.
ee/spec/graphql/ee/types/group_type_spec.rb
View file @
ade086ac
...
@@ -38,7 +38,7 @@ RSpec.describe GitlabSchema.types['Group'] do
...
@@ -38,7 +38,7 @@ RSpec.describe GitlabSchema.types['Group'] do
let_it_be
(
:query
)
do
let_it_be
(
:query
)
do
%(
%(
query {
query {
group(fullPath:"#{group.full_path}") {
group(fullPath:
"#{group.full_path}") {
name
name
vulnerabilities {
vulnerabilities {
nodes {
nodes {
...
...
ee/spec/graphql/types/project_type_spec.rb
View file @
ade086ac
...
@@ -31,14 +31,14 @@ RSpec.describe GitlabSchema.types['Project'] do
...
@@ -31,14 +31,14 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be
(
:query
)
do
let_it_be
(
:query
)
do
%(
%(
query {
query {
project(fullPath: "#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
securityScanners {
securityScanners {
enabled
enabled
available
available
pipelineRun
pipelineRun
}
}
}
}
}
}
)
)
end
end
...
@@ -74,7 +74,7 @@ RSpec.describe GitlabSchema.types['Project'] do
...
@@ -74,7 +74,7 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be
(
:query
)
do
let_it_be
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath:
"#{project.full_path}") {
vulnerabilities {
vulnerabilities {
nodes {
nodes {
title
title
...
...
ee/spec/graphql/types/vulnerability_type_spec.rb
View file @
ade086ac
...
@@ -26,7 +26,7 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
...
@@ -26,7 +26,7 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath:
"#{project.full_path}") {
name
name
vulnerabilities {
vulnerabilities {
nodes {
nodes {
...
...
ee/spec/requests/api/graphql/epics/epic_resolver_spec.rb
View file @
ade086ac
...
@@ -91,16 +91,16 @@ RSpec.describe 'getting epics information' do
...
@@ -91,16 +91,16 @@ RSpec.describe 'getting epics information' do
field_queries
=
args
.
map
{
|
key
,
value
|
"
#{
key
}
:
\"
#{
value
}
\"
"
}.
join
(
','
)
field_queries
=
args
.
map
{
|
key
,
value
|
"
#{
key
}
:
\"
#{
value
}
\"
"
}.
join
(
','
)
<<~
QUERY
<<~
QUERY
query {
query {
group(fullPath:"
#{
group
.
full_path
}
") {
group(fullPath: "
#{
group
.
full_path
}
") {
id,
id,
epics(
#{
field_queries
}
) {
epics(
#{
field_queries
}
) {
nodes {
nodes {
id
id
}
}
}
}
}
}
}
}
QUERY
QUERY
end
end
...
...
ee/spec/requests/api/graphql/project/pipeline/security_report_summary_spec.rb
View file @
ade086ac
...
@@ -20,8 +20,8 @@ RSpec.describe 'Query.project(fullPath).pipeline(iid).securityReportSummary' do
...
@@ -20,8 +20,8 @@ RSpec.describe 'Query.project(fullPath).pipeline(iid).securityReportSummary' do
let_it_be
(
:query
)
do
let_it_be
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath:
"#{project.full_path}") {
pipeline(iid:"#{pipeline.iid}") {
pipeline(iid:
"#{pipeline.iid}") {
securityReportSummary {
securityReportSummary {
dast {
dast {
scannedResourcesCount
scannedResourcesCount
...
...
ee/spec/requests/api/graphql/project/vulnerability_severities_count_spec.rb
View file @
ade086ac
...
@@ -10,7 +10,7 @@ RSpec.describe 'Query.project(fullPath).vulnerabilitySeveritiesCount' do
...
@@ -10,7 +10,7 @@ RSpec.describe 'Query.project(fullPath).vulnerabilitySeveritiesCount' do
let_it_be
(
:query
)
do
let_it_be
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath:
"#{project.full_path}") {
vulnerabilitySeveritiesCount {
vulnerabilitySeveritiesCount {
high
high
}
}
...
...
spec/graphql/types/issue_type_spec.rb
View file @
ade086ac
...
@@ -132,14 +132,14 @@ RSpec.describe GitlabSchema.types['Issue'] do
...
@@ -132,14 +132,14 @@ RSpec.describe GitlabSchema.types['Issue'] do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
project(fullPath:
"#{project.full_path}")
{
project(fullPath:
"#{project.full_path}")
{
issue(iid:
"#{issue.iid}")
{
issue(iid:
"#{issue.iid}")
{
descriptionHtml
descriptionHtml
notes{
notes
{
edges{
edges
{
node{
node
{
bodyHtml
bodyHtml
author{
author
{
username
username
}
}
body
body
...
...
spec/graphql/types/project_type_spec.rb
View file @
ade086ac
...
@@ -148,47 +148,47 @@ RSpec.describe GitlabSchema.types['Project'] do
...
@@ -148,47 +148,47 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be
(
:query
)
do
let_it_be
(
:query
)
do
%(
%(
query {
query {
project(fullPath: "#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
sastCiConfiguration {
sastCiConfiguration {
global {
global {
nodes {
type
options {
nodes {
nodes {
type
options {
nodes {
label
value
}
}
field
label
label
defaultValue
value
value
}
}
}
}
pipeline {
field
label
defaultValue
value
}
}
pipeline {
nodes {
type
options {
nodes {
nodes {
type
options {
nodes {
label
value
}
}
field
label
label
defaultValue
value
value
}
}
}
}
analyzers {
field
nodes {
label
name
defaultValue
label
value
enabled
}
}
}
}
analyzers {
nodes {
name
label
enabled
}
}
}
}
}
}
}
}
)
)
end
end
...
...
spec/graphql/types/snippets/blob_viewer_type_spec.rb
View file @
ade086ac
...
@@ -44,7 +44,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
...
@@ -44,7 +44,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
snippets(ids:
"#{snippet.to_global_id}")
{
snippets(ids:
"#{snippet.to_global_id}")
{
edges {
edges {
node {
node {
blob {
blob {
...
@@ -70,7 +70,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
...
@@ -70,7 +70,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
snippets(ids:
"#{snippet.to_global_id}")
{
snippets(ids:
"#{snippet.to_global_id}")
{
edges {
edges {
node {
node {
blob {
blob {
...
...
spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb
View file @
ade086ac
...
@@ -30,22 +30,22 @@ RSpec.describe 'Getting Metrics Dashboard Annotations' do
...
@@ -30,22 +30,22 @@ RSpec.describe 'Getting Metrics Dashboard Annotations' do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
environments(name: "#{environment.name}") {
environments(name: "#{environment.name}") {
nodes {
nodes {
metricsDashboard(path: "#{path}"){
metricsDashboard(path: "#{path}") {
annotations(#{args}){
annotations(#{args}) {
nodes {
nodes {
#{fields}
#{fields}
}
}
}
}
}
}
}
}
}
}
}
}
)
}
}
)
end
end
before
do
before
do
...
...
spec/requests/api/graphql/project/jira_import_spec.rb
View file @
ade086ac
...
@@ -107,7 +107,7 @@ RSpec.describe 'query Jira import data' do
...
@@ -107,7 +107,7 @@ RSpec.describe 'query Jira import data' do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath:
"#{project.full_path}") {
jiraImports(first: 1) {
jiraImports(first: 1) {
nodes {
nodes {
jiraProjectKey
jiraProjectKey
...
@@ -133,7 +133,7 @@ RSpec.describe 'query Jira import data' do
...
@@ -133,7 +133,7 @@ RSpec.describe 'query Jira import data' do
let
(
:query
)
do
let
(
:query
)
do
%(
%(
query {
query {
project(fullPath:"#{project.full_path}") {
project(fullPath:
"#{project.full_path}") {
jiraImports(last: 1) {
jiraImports(last: 1) {
nodes {
nodes {
jiraProjectKey
jiraProjectKey
...
...
spec/requests/api/graphql/project_query_spec.rb
View file @
ade086ac
...
@@ -76,16 +76,16 @@ RSpec.describe 'getting project information' do
...
@@ -76,16 +76,16 @@ RSpec.describe 'getting project information' do
def
run_query
(
number
)
def
run_query
(
number
)
q
=
<<~
GQL
q
=
<<~
GQL
query {
query {
project(fullPath: "
#{
project
.
full_path
}
") {
project(fullPath: "
#{
project
.
full_path
}
") {
mergeRequests(first:
#{
number
}
) {
mergeRequests(first:
#{
number
}
) {
nodes {
nodes {
assignees { nodes { username } }
assignees { nodes { username } }
headPipeline { status }
headPipeline { status }
}
}
}
}
}
}
}
}
GQL
GQL
post_graphql
(
q
,
current_user:
current_user
)
post_graphql
(
q
,
current_user:
current_user
)
...
...
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