denormalizr
denormalizr copied to clipboard
Doesn't support using a function in getIdAttribute
Normalizr allows you to pass a function to idAttribute instead of a string but as denormalizr seems to assume that the returned value from schema.getIdAttribute is a string it won't work.
https://github.com/gpbl/denormalizr/blob/3213960e64af3894e711616d9c536ad0a7ed0ab2/src/index.js#L23
I guess I could work around this issue by plucking the id attributes from my objects before denormalizing but that doesn't feel optimal...
Thanks @lingard I wasn't aware it could be a function. Working on this in the next days if you won't send a PR first 😄
I think https://github.com/gpbl/denormalizr/pull/35 fixed it. @lingard can you try?