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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 18:10:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 18:10:05 +0300
commitd57e27ef353787dac501d6970c546c9d86dd1f88 (patch)
tree89044194e81f95aaa15ace8a5d6a5b429179965f /app/helpers/startupjs_helper.rb
parenta27b8a5c104f492e4b0abac4c84385a615c4f6ba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/startupjs_helper.rb')
-rw-r--r--app/helpers/startupjs_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/startupjs_helper.rb b/app/helpers/startupjs_helper.rb
new file mode 100644
index 00000000000..da95cfe03ee
--- /dev/null
+++ b/app/helpers/startupjs_helper.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module StartupjsHelper
+ def page_startup_graphql_calls
+ @graphql_startup_calls
+ end
+
+ def add_page_startup_graphql_call(query, variables = {})
+ @graphql_startup_calls ||= []
+ query_str = File.read(File.join(Rails.root, "app/assets/javascripts/#{query}.query.graphql"))
+ @graphql_startup_calls << { query: query_str, variables: variables }
+ end
+end