Fetch product analytics project settings via GraphQL

Re-creating issue to complete this work after https://gitlab.com/gitlab-org/security/gitlab/-/issues/1104

Problem to solve

We need the current project-level settings for the product analytics onboarding flow in order to populate the settings form which will be introduced in Allow configuring project-level provider settin... (#462964 - closed), as well as knowing if we need to clear settings (introduced in Allow configuring project-level provider settin... (#451315 - closed))

Currently we pass these from the backend via data- attributes. Once we start mutating the values, we will need to update our local state, so leaning on Apollo client will simplify this.

Proposed solution

Fetch the settings via graphql, from the new endpoint created in Add GraphQL endpoint for fetching product analy... (#462963 - closed) This endpoint enforces correct permission checks.

Implementation plan

  • add query in provider_selection_view.vue for project-level settings
    • query is defined in the linked resolver issue
    • add loading state which hides both provider cards when fetching settings
    • add error state which shows message and hides cards when this request fails
  • pass results into both gitlab-managed / self-managed provider cards via a prop
    • ensure mutation in gitlab-managed provider updates apollo cache for these settings since we'll no longer be mutating local component state
  • remove injected project settings from components, all the way up to index.js
  • remove property from backend dashboard_list_app_data
  • remove/update tests
Edited by Elwyn Benson