Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - satanTime/ngrx-entity-relationship: ORM selectors for redux, @ngrx/store, @ngrx/entity and @ngrx/data. Ease of relationships with entities.

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

Visit SiteGitHub - satanTime/ngrx-entity-relationship: ORM selectors for redux, @ngrx/store, @ngrx/entity and @ngrx/data. Ease of relationships with entities.

GitHub - satanTime/ngrx-entity-relationship: ORM selectors for redux, @ngrx/store, @ngrx/entity and @ngrx/data. Ease of relationships with entities.

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

Powered by 0x5a.live 💗

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!

Angular Resources

are all listed below.

Resources

listed to get explored on!!

Made with ❤️

to provide different kinds of informations and resources.