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

ngrx-entity-relationship

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngrx-entity-relationship

ORM selectors for redux, @ngrx/entity and @ngrx/data. Ease of relationships with entities.

  • 1.7.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
404
decreased by-17.38%
Maintainers
1
Weekly downloads
 
Created
Source

chat on gitter npm version build status coverage status language grade

ORM selectors for redux, @ngrx/entity and @ngrx/data and ease of relationships with entities

ngrx-entity-relationship helps to:

  • select relational data from Redux or NGRX stores
  • maintain store with normalized entities
  • quickly build queries for GraphQL

Important links

Very short introduction

The best way is to read documentation, but there is an example below for a quick introduction.

If we want to select a user with its company and with the address of the company, in order that the final object would look like that:

const user = {
  id: '1',
  firstName: 'John',
  lastName: 'Smith',
  companyId: '1',
  company: {
    id: '1',
    name: 'Magic',
    adminId: '2',
    addressId: '1',
    address: {
      id: '1',
      street: 'Main st.',
      city: 'Town',
      country: 'Land',
    },
  },
};

We need to use a selector built by ngrx-entity-relationship for Redux or NGRX like that:

const selectUser = rootUser(
  relUserCompany(
    relCompanyAddress(),
  ),
);

Profit.

What you could do next

Thank you!

Keywords

FAQs

Package last updated on 30 Jan 2022

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