Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cubicweb/rql-generator

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubicweb/rql-generator

Helpers to build RQL queries

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

@cubicweb/rql-generator

This library exposes a set of helpers to make building RQL transactions simpler.

Installation

@cubicweb/rql-generator is available from NPM:

# With NPM
npm i @cubicweb/rql-generator
# Or with Yarn
yarn add @cubicweb/rql-generator

Usage

This library works on an existing transaction object. This allows you to combine different helpers on the same object to create complex transactions.

Please refer to the documentation of @cubicweb/client on how to create the instanceSchema and client parameters.

import { Transaction } from "@cubicweb/client";
import {instanceSchema, client} from "../data"

const transaction = new Transaction()
const { resolveEntity } = pushEntityFromEid(transaction, instanceSchema, 5, "BlogEntry", [
    "title",
    "content"
]);
const result = await client.executeTransaction(transaction)
const entity = resolveEntity(result)
console.log(entity)
// Will print {title: "entity title", content: "entity content"}

Documentation

You can find the full documentation with examples here.

Contribute

All @cubicweb libraries are in the cubicwebjs monorepo. Please refer to the main README.

Get Help

Contact us on Matrix and check the roadmap on the CubicWeb Repository.

Keywords

FAQs

Package last updated on 13 Jun 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc