Fix NamespacesLinkPaths.newCommentTemplate field to be array of strings
The NamespacesLinkPaths.newCommentTemplate
field, added in !189606 (merged), was defined as a String
. However it appears that most of the frontend code that would use the value expects it to be a Object[]
instead.
Example
For the query
fragment namespaceURLs on Namespace {
linkPaths {
newCommentTemplate
}
}
query getNamespaceLinks {
user_namespace: namespace(fullPath: "kattie") {
...namespaceURLs
}
public_group_namespace: namespace(fullPath: "group-public") {
...namespaceURLs
}
public_project_namespace: namespace(fullPath: "group-public/p1") {
...namespaceURLs
}
private_group_namespace: namespace(fullPath: "group-private") {
...namespaceURLs
}
private_project_namespace: namespace(fullPath: "group-private/p1") {
...namespaceURLs
}
}
The expected result is something like
{
"data": {
"user_namespace": {
"linkPaths": {
"newCommentTemplate": null
}
},
"public_group_namespace": {
"linkPaths": {
"newCommentTemplate": [
{
"text": "Your comment templates",
"href": "/-/profile/comment_templates"
},
{
"text": "Group comment templates",
"href": "/groups/group-public/-/comment_templates"
}
]
}
},
"public_project_namespace": {
"linkPaths": {
"newCommentTemplate": [
{
"text": "Your comment templates",
"href": "/-/profile/comment_templates"
},
{
"text": "Project comment templates",
"href": "/group-public/p1/-/comment_templates"
},
{
"text": "Group comment templates",
"href": "/groups/group-public/-/comment_templates"
}
]
}
},
"private_group_namespace": {
"linkPaths": {
"newCommentTemplate": [
{
"text": "Your comment templates",
"href": "/-/profile/comment_templates"
},
{
"text": "Group comment templates",
"href": "/groups/group-private/-/comment_templates"
}
]
}
},
"private_project_namespace": {
"linkPaths": {
"newCommentTemplate": [
{
"text": "Your comment templates",
"href": "/-/profile/comment_templates"
},
{
"text": "Project comment templates",
"href": "/group-private/p1/-/comment_templates"
},
{
"text": "Group comment templates",
"href": "/groups/group-private/-/comment_templates"
}
]
}
}
},
"correlationId": "01JY3W1M593B17C7DYPXN4288A"
}
Edited by Kassio Borges