0.0.5-a-20241017 • Published 8 months ago

@gitlab/query-language v0.0.5-a-20241017

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
8 months ago

@gitlab/query-language

GitLabQueryLanguage is an npm module that provides a simple interface for converting glql queries into other formats.

It wraps the WebAssembly build of the glql compiler.

Usage

Install the module:

npm install --save @gitlab/query-language

Import and use the module:

<script type="module">
  import { GitLabQueryLanguage } from '@gitlab/query-language';

  const glql = GitLabQueryLanguage();
  glql.group = "gitlab-org";
  glql.username = "johnhope";
  await glql.initialize();

  let query = 'label != "backend" and author = currentUser() and weight = 1 and updated > today()';

  let graphql = glql.compile("graphql", query);

  console.log(graphql);
</script>

Running the Example

Clone the repo and install the dev dependencies:

npm install

Build the module:

npm run build

Start the server of your choice. E.g.wds:

npx wds
0.0.5-a-20241017

8 months ago

0.0.5-a-20241003

9 months ago

0.0.5-a-20240903

10 months ago

0.0.5-a-20240823

10 months ago

0.0.5-a-20240809

11 months ago

0.0.5-a-20240806

11 months ago

0.0.5-a-20240802

11 months ago