adopted-ember-addons / adopted-ember-addons/ember-data-model-fragments
Supplying a unique key to ensure response is correctly mapped for array fragment
- Lenguaje dominante
- TypeScript
- Estrellas
- 367
- Forks
- 108
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi, thanks for making this addon it takes care of a much needed use case in ember data.
@goldstarlearning we are using this addon to handle rich json documents in some of our models. The issue we are having has to do with the Array fragments in the library, and the way that response data is applied in the library relies on indexes. https://github.com/lytics/ember-data-model-fragments/blob/master/addon/array/fragment.js#L43
This has a knack for causing issues for us, when the server and client do not order arrays in the same way.
The solution I would like to see in the library is the ability to specify a unique key. This unique key in our case is not necessarily globally unique (think something like an order number etc..). This would provide a more robust way to handling reconciling data.
Guía de contribución
Línea de trabajo
Start with addon/array/fragment.js at line 43, where response data is applied using array indexes. Trace how array fragments are reconciled when server and client ordering differs, then determine how a caller-supplied unique key should be specified and used. Done means array fragment responses map correctly despite differing order, including keys that are not globally unique.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100