diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-01 18:10:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-01 18:10:05 +0300 |
commit | d57e27ef353787dac501d6970c546c9d86dd1f88 (patch) | |
tree | 89044194e81f95aaa15ace8a5d6a5b429179965f /app/helpers/startupjs_helper.rb | |
parent | a27b8a5c104f492e4b0abac4c84385a615c4f6ba (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/startupjs_helper.rb')
-rw-r--r-- | app/helpers/startupjs_helper.rb | 13 |
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 |