From 59e6c2df22c69baa791529db3326e68c9de10b54 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 8 Oct 2021 21:09:48 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/helpers/startupjs_helper.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/helpers/startupjs_helper.rb') diff --git a/app/helpers/startupjs_helper.rb b/app/helpers/startupjs_helper.rb index b595590c7c9..2e8f0cb7dbe 100644 --- a/app/helpers/startupjs_helper.rb +++ b/app/helpers/startupjs_helper.rb @@ -5,6 +5,13 @@ module StartupjsHelper @graphql_startup_calls end + def page_startup_graphql_headers + { + 'X-CSRF-Token' => form_authenticity_token, + 'x-gitlab-feature-category' => ::Gitlab::ApplicationContext.current_context_attribute(:feature_category).presence || '' + } + end + def add_page_startup_graphql_call(query, variables = {}) @graphql_startup_calls ||= [] file_location = File.join(Rails.root, "app/graphql/queries/#{query}.query.graphql") -- cgit v1.2.3