Add X-GitLab-Organization-ID header to axios and GraphQL calls
What does this MR do and why?
Related to #541693 (closed)
The grouporganizations team is working to build Organizations and part of this is having isolation so you only see the data (groups, projects, etc) that is in your organization. We need to pass the current organization as a header with any async frontend requests (axios or GraphQL). This MR adds a header to these requests in the global config.
For more info see https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/organization/current_organization/#header-field
Screenshots or screen recordings
Axios
GraphQL
How to set up and validate locally
- Go to
/rails/featuresand enableui_for_organizationsfeature flag - Open dev tools Network tab
- Go to
/-/organizations/default/groups_and_projectsand view GraphQL request headers - Go to
/-/organizations/default/activityand viewactivity.jsonrequest headers
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Peter Hegman

