GraphQL: Create GraphQL resolver for providing runner installation and registration instructions
As part of the larger effort to move towards GraphQL and Apollo, we need a GraphQL resolver to provide runner installation and registration instructions for the endpoints created in the following issue #214587 (closed)
The desired resolver would look like this
query getPlatformInstructions {
platform {
name
humanReadableName
architectures {
name
downloadLocation
installationInstructions
registerInstructions
}
}
}
There's a branch that uses this resolver with mocked data in: https://gitlab.com/gitlab-org/gitlab/-/branches/all?utf8=%E2%9C%93&search=jivanvl-runner-guided-install-frontend-graphql
The current REST API endpoints are the following:
runner_setup_scripts_admin_runners_path
runner_setup_platforms_path
The frontend Vuex iteration uses those in a couple of haml files !42877 (diffs)
One thing to note that the above endpoints work differently if we're in a project, group or the admin runners section, so the registration token would change for each.