Skip to content

Utilise GraphQL over HAML dataset

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Context

We want to minimise the data we pass through the HAML and inject into Vue components. Here's the spreadsheet with analysis (internal-only) of what we need and what is or is not exposed.

Needed changes

Independent from backend

field name in HAML is in GraphQL Ruby reference GraphQL reference To do
ref_type FALSE Previously taken from this.$route.meta.refType OR this.$route.query.ref_type. Remove from vue_blob_header_app_data helper and use this.$route.meta.refType OR this.$route.query.ref_type
ssh_url TRUE ssh_url sshUrlToRepo Add to app/assets/javascripts/repository/queries/project_info.query.graphql
http_url TRUE http_url httpUrlToRepo Add to app/assets/javascripts/repository/queries/project_info.query.graphql
blob_path TRUE getBlobControls path Already in use. Remove from vue_blob_header_app_data helper.
history_link FALSE history_link RepositoryBlob historyPath Remove. We don't even need it for the header app.

Dependent on backend

Here's a list of backend work that will need to be addressed on frontend once completed:

field name in HAML is in GraphQL Ruby reference GraphQL reference To do
project_root_path FALSE project_root_path Needed on refSelector change. Expose on Project.
xcode_url FALSE xcode_url Expose on Project
kerberos_url FALSE kerberos_url Expose on Project
is_binary FALSE def binary? SnippetBlob binary Expose on RepositoryBlob
Edited by 🤖 GitLab Bot 🤖