[go: up one dir, main page]

Skip to content

Expose what mutations can be performed on a resource in GraphQL

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

We could define what mutations can be performed on a resource like this

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: (+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.

Edited by 🤖 GitLab Bot 🤖