@gitlab/query-language-rust

0.7.0 • Public • Published

@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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.7.083,245latest

Version History

VersionDownloads (Last 7 Days)Published
0.7.083,245
0.6.07
0.5.231,099
0.5.168
0.5.0105
0.4.21,981
0.4.11
0.4.02
0.3.22,502
0.3.12
0.3.01
0.2.01
0.1.262
0.1.11
0.1.01

Package Sidebar

Install

npm i @gitlab/query-language-rust

Weekly Downloads

119,078

Version

0.7.0

License

MIT

Unpacked Size

713 kB

Total Files

4

Last publish

Collaborators

  • rob.hunt-gitlab
  • gitlab-administration
  • tzallmann
  • gitlab-bot
  • leipert
  • apanchal-gitlab
  • jhope-gitlab