Skip to content

Create a facade component for GLQL

Himanshu Kapoor requested to merge 478530-glql-facade-component into master

What is GLQL?

GitLab Query Language (GLQL) is an experimental attempt to create a single query language for all of GitLab which allows for filtering and embedding content from anywhere in the product.

See epic summary: &14767 for more details.

What does this MR do and why?

Create a facade component for GLQL

Introduce a new facade component for GLQL that handles loading and error states for queries. It also serves as an entry point for execution and presentation of queries.

Related to #478530 (closed), https://gitlab.com/gitlab-org/gitlab/-/issues/478758

This is a multi-MR effort to split !161632 (closed) into smaller MRs.

  1. Push feature flag :glql_integration to frontend (!161942 - merged)
  2. Render GLQL blocks into a simple list of issues (!162050 - merged)
  3. Render GLQL blocks into a table of issues (!162081 - merged)
  4. Add field presenters for GLQL: bool, time, heal... (!162951 - merged)
  5. Add presenters for GitLab objects for GLQL (!163056 - merged)
  6. Sort columns in a GLQL table (!163317 - merged)
  7. Create a facade component for GLQL (!163618 - merged) (👈 This MR)
  8. Allow resizing table columns in a GLQL table (!163306 - merged)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Loading state Error state
image.png image
Error: Max number of GLQL blocks exceeded
Screen Recording 2024-08-22 at 14.38.09.mov

How to set up and validate locally

Testing loading state

  1. Enable feature flag :glql_integration.
  2. In a project, assign yourself some issues.
  3. Create a wiki page with the following content:
```glql
---
display: table
fields: title, assignees, labels, milestone, epic
---
assignee = currentUser()
```
  1. Save the page.
  2. Notice the loading state while the query tries to display.

Testing error states

Use the below query:

```glql
---
display: table
fields: title, assignees, labels, milestone, epic
---
assignee = "root
```

Testing maximum number of GLQL blocks per page.

Current limit is 20. So add 21 GLQL blocks on a page, the last one should show an error. Clicking Try again should render it anyway.

Edited by Himanshu Kapoor

Merge request reports

Loading