morrys / react-relay-offline

TypeScript library files for Relay Modern Offline
https://morrys.github.io/react-relay-offline/docs/react-relay-offline.html
MIT License
224 stars 15 forks source link

createFragmentContainer in v3 #100

Closed matt-dalton closed 2 years ago

matt-dalton commented 2 years ago

We've (finally) tried to upgrade to version 3. It seems we can no longer import createFragmentContainer from react-relay-offline. Has this now been completely removed?

I saw in the release notes that the Query HOC has been removed, but the fragment container is significantly harder for us to migrate off in one go (we'd have to refactor basically every component). Do we need to switch everything to hooks to upgrade to v3 (and hence relay 10)?

morrys commented 2 years ago

Hi @matt-dalton, i removed the import from react-relay-offline but it is still possible to use it through react-relay.

Fragments do not have specific logic for offline management.

Let me know if you have any problems using them 👍

matt-dalton commented 2 years ago

Ah OK perfect - that gives us a workaround 👍

Is it also OK to import graphql from react-relay directly? Presumably there's no offline-specific logic there either

matt-dalton commented 2 years ago

...also - presumably it's the same situation for createPaginationContainer?

morrys commented 2 years ago

Yes 👍

matt-dalton commented 2 years ago

Brilliant - thanks for such a quick response 👌🏻