diff options
Diffstat (limited to 'app/helpers/startupjs_helper.rb')
-rw-r--r-- | app/helpers/startupjs_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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") |