0.8.4 • Published 11 months ago

@gitlab/query-language-rust v0.8.4

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

@gitlab/query-language-rust

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, written in Rust.

The Rust version is a port of the original Haskell version.

Usage

Install the module:

npm install --save @gitlab/query-language-rust

Import and use the module:

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

  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.8.4

11 months ago

0.8.3

11 months ago

0.8.2

11 months ago

0.8.1

11 months ago

0.8.0

12 months ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago