Expose what mutations can be performed on a resource in GraphQL
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=23421)
</details>
<!--IssueSummary end-->
We could define what mutations can be performed on a resource like this
```ruby
class Types::MergeRequestType
available_mutations Mutations::MergeRequests::WipMutation, Mutations::MergeRequests::MergeMutation #, ...
end
```
That could then expose those mutations by their GraphQL name, and a boolean indicating whether or not the current user can perform that mutation on the resource.
___
The following discussion from gitlab-ce!20443 should be addressed:
- [ ] @DouweM started a [discussion](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20443#note_89769432): (+2 comments)
> What is the GraphQL way of communicating to the API consumer that a specific mutation is available to them, when they query the MR for example?
>
> This is somewhat related to our conversation about exposing abilities.
issue