New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cubicweb/data-provider

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubicweb/data-provider

CubicWeb data provider implementation

  • 0.3.0-alpha.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by27.27%
Maintainers
3
Weekly downloads
 
Created
Source

@cubicweb/data-provider

Originally made for react-admin, this package provides a set of utility functions to handle entities with the API.

It allows to generate RQL requests to get, update and create entities and send those requests to the API using @cubicweb/client. See react-admin documentation to learn how this interface works.

Installation

@cubicweb/data-provider is available from NPM:

# With NPM
npm i @cubicweb/client
# Or with Yarn
yarn add @cubicweb/client

Usage

This library exposes the createDataProvider function to create a new data provider using a specific schema and client from @cubicweb/client.

import {Client, Schema} from "@cubicweb/client"
import {createDataProvider} from "@cubicweb/data-provider"

// First create your schema
import jsonSchema from "./schema.json"
const schema = new Schema(jsonSchema);

// Then your client
const client = new Client(BASE_URL)

// Use those to generate your data provider
const dataProvider = createDataProvider(client, schema)

Future of this package

Please note we are trying to move away from this interface. While it works for react-admin, the interface is too restrictive for more complex CubicWeb applications.

We are planning on releasing similar helper functions in another package without restrictions imposed by react-admin's data-provider interface.

This data provider will then use those helper functions se we can still use react-admin with CubicWeb.

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 05 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