hasura / ra-data-hasura

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

`react-admin` v4 compatibility #109

Closed LucaColonnello closed 2 years ago

LucaColonnello commented 2 years ago

Is this library compatible with react-admin v4?

As it is depending on ra-data-graphql, which is compatible with react-admin v4, is it just a matter of update the lib package json to use v4?

I can make a contribution if some work needs to be done to make this generally compatible with v4, if given some direction on how to :D

Thank you!!!

LucaColonnello commented 2 years ago

Made a PR just in case, https://github.com/hasura/ra-data-hasura/pull/110

I wasn't able to thoroughly test it, so I will need some help, but tests seem to be pass and trying it out via github codespaces only gave me CORS issues, but the queries worked fine it seemed.

cpursley commented 2 years ago

Is this backwords compatible?

LucaColonnello commented 2 years ago

Hey @cpursley ! I think if we have the guarantee that it works, we can just make the peerDependency call out both react-admin versions and it should be ok!

LucaColonnello commented 2 years ago

@cpursley I've added react-admin v3 as a peerDependency along side v4. This should allow us to support both, but we still need to test it. Can you help with it (if you can test it on your side, or if you can provide instructions on how to test it)?

LucaColonnello commented 2 years ago

@cpursley any news on this?

Totally appreciate if you don't have time testing, if you can give me some pointers to test, I can try myself locally and report my findings.

Unit tests are all passing by the way!

Thank you!!

cpursley commented 2 years ago

@LucaColonnello I won't have time for a while to take a look

LucaColonnello commented 2 years ago

That's ok, can we at least merge and publish it? It should not break compatibility as it's just peerDependencies

LucaColonnello commented 2 years ago

Maybe @fkowal can help on this? Sorry if this is a bit forward, just trying to understand who can help move this forward :)

LucaColonnello commented 2 years ago

I'm testing this change in an app, I just published it in my own npm under rav4-data-hasura and it works perfectly with react-admin v4 so far (I tested lists, create and edit)