
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@semantq/semantqql
Advanced tools
CRUD Abstraction for Semantq Full Stack Apps (semantqQL)
A super lightweight, robust, and reusable JavaScript HTTP client class that abstracts standard CRUD (Create, Read, Update, Delete) operations with simple fetch API calls — designed to streamline REST API interactions in your full-stack SemantQL projects.
Install via npm:
npm install @semantq/ql
Import it into your project:
import smQL from '@semantq/ql';
Create an instance with the endpoint URL, HTTP method, request body (if any), and optional configuration:
const result = await new smQL(endpoint, method, body, options);
endpoint: URL string of your API resource
method: HTTP method string (GET, POST, PUT, PATCH, DELETE) — defaults to GET
body: Request payload for methods like POST or PUT (default: null)
options: Optional configuration object — supports:
headers — additional headerslog — boolean to enable/disable automatic console logging (default: true)By default, semantQL.js automatically logs success or failure messages to the console for every request, showing HTTP method, status, and response data.
You do not need to manually log responses in your application code unless you disable logs explicitly:
await new smQL('http://localhost:3003/product/products', 'GET', null, { log: false });
The promise resolves to an object containing:
{
status: number, // HTTP status code
ok: boolean, // true if response.ok (status 2xx)
data: any, // Parsed JSON or plain text response body
error?: string // Error message if request failed
}
You can use this object directly without needing extra logging.
const data = await new smQL('http://localhost:3003/product/products');
//now you can do: console.log(data);
const newCategory = { name: 'Mobiles' };
const response = await new smQL('http://localhost:3003/category/categories', 'POST', newCategory);
const updatedCategory = { name: 'Mobile Phones' };
const categoryId = 7;
const response = await new smQL(`http://localhost:3003/category/categories/${categoryId}`, 'PUT', updatedCategory);
const productId = 42;
const response = await new smQL(`http://localhost:3003/product/products/${productId}`, 'DELETE', null, { log: false });
This class serves as a simple CRUD abstraction layer within the full-stack SemantQL setup, allowing you to:
It’s lightweight and designed with developer experience in mind.
Happy CRUDing. !!!
Semantq is open-source software licensed under the MIT License.
FAQs
CRUD abstraction module for SemantQL
We found that @semantq/semantqql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.