[BE] Create GraphQL framework to support granular token authorization

A GraphQL framework should be created to support granular personal access token authorization.

For this framework, we need the following components:

  • A Directives::Authz::GranularScope directive class to tag mutations and types with permission enums
  • A Types::Authz::PermissionEnum enum class to define the available permissions
  • A Gitlab::GraphQL::Authz::GranularScopeAuthorization extension class to set the boundary and authorize the requests
  • A Gitlab::GraphQL::QueryAnalyzers::AST:: GranularScopeAnalyzer analyzer class to set the required permissions for each request

A PoC for these classes can be found here: !196281 (closed)

Edited by 🤖 GitLab Bot 🤖