doc/api/graphql/custom_emoji.md
{{< details >}}
{{< /details >}}
{{< history >}}
custom_emoji. Disabled by default.custom_emoji removed.{{< /history >}}
To use custom emoji in comments and descriptions, you can add them to a top-level group by using the GraphQL API.
mutation CreateCustomEmoji($groupPath: ID!) {
createCustomEmoji(input: {groupPath: $groupPath, name: "party-parrot", url: "https://cultofthepartyparrot.com/parrots/hd/parrot.gif"}) {
clientMutationId
customEmoji {
name
}
errors
}
}
After you add a custom emoji to the group, members can use it in the same way as other emoji in the comments.
The query accepts these attributes:
| Attribute | Type | Required | Description |
|---|---|---|---|
group_path | integer or string | Yes | ID or URL-encoded path of the top-level group. |
name | string | Yes | Name of the custom emoji. |
file | string | Yes | URL of the custom emoji image. |
You can use GraphiQL to query the emoji for a group.
Open GraphiQL:
https://gitlab.com/-/graphql-explorerhttps://gitlab.example.com/-/graphql-explorerCopy the following text and paste it in the left window.
In this query, gitlab-org is the group path.
query GetCustomEmoji {
group(fullPath: "gitlab-org") {
id
customEmoji {
nodes {
name,
url
}
}
}
}
Select Play.