hasura / ra-data-hasura

react-admin data provider for Hasura GraphQL Engine
MIT License
336 stars 70 forks source link

properly parse array in sanitize function #157

Closed nihauc12 closed 1 year ago

nihauc12 commented 1 year ago

proposition of fix for https://github.com/hasura/ra-data-hasura/issues/156

I've also simplified a bit the sanitizeResource function and added some tests.

Note that this change should be considered major in versionning since it breaks backward compatibility.

before:

sanitizeResource([0, 1, 2]) == { 0: 0, 1: 1, 2: 2}

after:

sanitizeResource([0, 1, 2]) == [0, 1 ,2]
JosepC12 commented 1 year ago

looks good!

nihauc12 commented 1 year ago

@praveenweb 👋 any news on this :) ?