Add / remove external custom emojis via GraphQL API
Proposal
When this issue is finished, users will be able to add/remove emoji using the API.
To create a custom emoji the user needs to provide to the API:
- The group ID/reference to add the emoji to
- The name of the emoji, as it will be used in the
:emoji_name:
syntax in GitLab Flavored Markdown - The URL where the image associated with the emoji can be find
Example request
Using GraphQL I image the mutation request to add a custom emoji would be something like:
mutation {
createCustomEmoji(input: {
groupPath: "gitlab-org",
name: "tanuki",
file: "https://about.gitlab.com/images/press/logo/png/gitlab-icon-rgb.png",
external: true
}) {
customEmoji {
name
}
errors
}
}
Limitations
When this issue is completed, you won't be able to do anything with the created emoji in the Web UI. You won't even see them. You only made be able to query them using GraphQL.
At the moment we will only support external images. So it won't be able to upload an image for the custom emoji. You can only specify the URL of the image.
Parameter external: true
is required, otherwise the request is rejected.
Feature flag
We should put this behind a feature flag, which is by default disabled. The feature is not usable, so we don't want to expose it yet.