Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-01-24 19:23:57 +0300
committerNick Thomas <nick@gitlab.com>2019-03-05 18:00:32 +0300
commit21779d00186d75349165d6c07dbe04aace68017c (patch)
tree25aaf112b51d6f5360a3e97db6f31f98a642660e /spec/support
parent42d3117f9c3371e07e8b0aafab6f504e87251c2a (diff)
Add metadata about the GitLab server to GraphQL
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/graphql_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb
index e468ee4676d..d9529262483 100644
--- a/spec/support/helpers/graphql_helpers.rb
+++ b/spec/support/helpers/graphql_helpers.rb
@@ -77,8 +77,9 @@ module GraphqlHelpers
def query_graphql_field(name, attributes = {}, fields = nil)
fields ||= all_graphql_fields_for(name.classify)
attributes = attributes_to_graphql(attributes)
+ attributes = "(#{attributes})" if attributes.present?
<<~QUERY
- #{name}(#{attributes}) {
+ #{name}#{attributes} {
#{fields}
}
QUERY