Comments (3)
In addition, rather than searching everything for resources to update, maybe it's better if a new part of the store holds the resources that need to be applied.
So the moment a resource is marked as CREATED
/UPDATED
/DELETED
then the identifier of that resource is put in the store which can then be used by apply instead of searching. What do you think?
from ngrx-json-api.
yes seems perfectly right, the set of ids of resources that are updated together should be stored in store as well. But I think this is something very application specific and ngrx-json-api should not attempt to solve that for an application.
In general I like the current data model. It is simple, normalized. I can select a resource and get all the information including original remote state, update state, etc. All that makes it easy to use and explain. So I think that should remain unchanged in the context of this ticket.
From a performance perspective, apply is called quite rarely. The looping a few dozen to thousand resources is negligible.
so to conclude, I think, just those array of ResourceIdentifier and a set of inclusions should be sufficient. But the documentation should state how to make use of that (meaning write an effect or something than then triggers the apply action with ids fetched from elsewhere in the application-specific part of the store)
from ngrx-json-api.
introduced a "ids" and "include" parameter to control which parts of the store should be applied to backend.
from ngrx-json-api.
Related Issues (20)
- reducer performance issues for API Success HOT 1
- Resource relationships HOT 2
- Angular 5 problems HOT 4
- API_GET_FAILED does not reset isLoading state
- document filtering and sorting HOT 1
- State does not return to `IN_SYNC` when patching resoruce HOT 5
- No url encoding - causes issues with special characters such as "[" HOT 1
- Support filter=value without path HOT 1
- Not an issue HOT 1
- Optionally add zone to pipes HOT 1
- NgrxJsonApiZoneService applies pending changes in reverse order HOT 2
- Add support of JSON:API Operations HOT 2
- Status of the project HOT 3
- Optional supports for sending changed attributes & relationships only in PATCH operation payload
- Add support for Atomic Operations Extension
- Remove package-lock.json HOT 1
- Send `meta` when creating/updating a resource
- Type mismatch in QueryParams interfaces HOT 1
- Angular 9 Support HOT 4
- Review README of the 9.0.x branch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngrx-json-api.