Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-bql

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-bql

Transform the high level bicycle query language within template strings into the object spec expected by bicycle

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

babel-plugin-transform-bql

Transform the high level bicycle query language within template strings into the object spec expected by bicycle

Build Status Dependency Status NPM version

Installation

npm install babel-plugin-transform-bql --save

Example

const query = bql`
  user(id: ${myUserID}) {
    id,
    name
  }
  event(year: 2016, month: 3, day: 20) {
    title
  }
`;

console.log(query);

Compiles to:

const query = {
  ["user(id:" + JSON.stringify(myUserID) + ")"]: {
    id: true,
    name: true
  },
  "event(day:20,month:3,year:2016)": {
    title: true
  }
};

console.log(query);

License

MIT

FAQs

Package last updated on 28 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts