Add `maxAccessLevel` attribute to GraphQL project type
Background
In Add missing attributes to GraphQL project type (#421442 - closed) we added some new attributes to the GraphQL project type but there was a miscommunication about the access level attribute (see #421442 (comment 1714912809)). We need an attribute to display the max access level the current user has to a project. We use this to display the access level badge
Requirements
- Add attribute to
Types::ProjectType
that returns the access level the current user has to the project. Proposal is to name this attributemaxAccessLevel
but feel free to propose other names.
Implementation guide
Needs refinement. It looks like other parts of the codebase use User#max_member_access_for_project
. We may need to do something similar to app/helpers/users_helper.rb#L61 for performance.
Edited by Peter Hegman