Socket
Book a DemoInstallSign in
Socket

@8base/crud

Package Overview
Dependencies
Maintainers
3
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@8base/crud

8base CRUD is a wrapper under the react-apollo component to simplify working with the crud operations.

latest
Source
npmnpm
Version
0.37.2
Version published
Weekly downloads
416
-22.39%
Maintainers
3
Weekly downloads
 
Created
Source

8base CRUD

8base CRUD is a wrapper under the react-apollo component to simplify working with the crud operations.

API

Table of Contents

  • RecordsList
  • RecordCreate
  • RecordCreateMany
  • ChildrenPropObject
  • RecordUpdate
  • RecordDelete

RecordsList

Extends Component

Component for fetching the table content

Properties

  • tableName string Name of the table
  • tableId string Id of the table

RecordCreate

Extends Component

Component for creating the record of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table

RecordCreateMany

Extends Component

Component for creating many records of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table

ChildrenPropObject

Results of the record update queries and mutation

Properties

RecordUpdate

Extends Component

Component for updating the record of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table
  • recordId string Id of the record

RecordDelete

Extends Component

Component for deleting the record of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table
  • recordId string Id of the record

Usage

  <RecordsList
    applicationName={ applicationName }
    tableName="someTableName"
    variables={ options.variables }
  >
    { ({ data, loading }) => (<div>{data}</div>) }
  </RecordsList>     
   <RecordUpdate
    tableId="table-id"
    recordId="42"
    onCompleted={ () => {
      ...
    } }
  >
    { (onSubmit, { tableMetaResult, recordDataResult, fetchingLoading }) => (
      <FormComponent initialValues={ recordDataResult.data } onSubmit={ onSubmit } />
    ) }
  </RecordUpdate>

FAQs

Package last updated on 20 Sep 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