Add GraphQL endpoint to expose available group and instance templates
Problem
Backend part of #442350 (comment 1810798716)+.
We expose available list of instance and group templates via Rails controller. This approach doesn't support a pagination and should be replaced with a separate GraphQL endpoint.
Proposal
- Add a GraphQL endpoint to fetch instance templates
- Add a GraphQL endpoint to fetch group templates
An example of the response
{
user(username:"user") {
id
groupTemplates {
nodes {
id
name
description
projects {
nodes {
id
name
description
}
}
}
}
instanceTemplates {
nodes {
id
name
description
}
}
}
}