jotaijs / jotai-apollo

Apollo graphql client integration for jotai :rocket: :ghost:
MIT License
50 stars 4 forks source link

feat: error handling #2

Closed dai-shi closed 1 year ago

dai-shi commented 2 years ago

In jotai, we implement "error handling" recently.

jotai-apollo should follow it so that we can recommend it. I think you want to refer jotai/urql implementation, which is almost the same as jotai-relay. (jotai/query is very unique/weird implementation, hope to fix it too eventually.)

Aslemammad commented 1 year ago

Check this https://github.com/jotai-labs/jotai-apollo/commit/3902497335abf7c1def69d22bd123d3f078e2304 and let me know your opinion.

dai-shi commented 1 year ago

Thanks for working on it. I would avoid relaying on Math.random in tests.

btw, I made a new implementation in https://github.com/jotai-labs/jotai-urql. It will supersede jotai/urql. https://github.com/pmndrs/jotai/pull/1473

We want to follow that new implementation. I will also apply it to jotai-relay.

Aslemammad commented 1 year ago

Sure, ok!

Aslemammad commented 1 year ago

Hey @dai-shi, Feel free to review the new impl of atomsWithQuery. And let me know if you think it's proper and I can follow it in other atoms.

dai-shi commented 1 year ago

@Aslemammad Can you make it a draft PR?