-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Architecture documentation #2
Comments
Soon I will create a roadmap within github to highlight the macro themes that will be addressed by the individual libraries. The architecture and related documentation will be extended and integrated according to the needs of the community. As for the apollo libraries, the features introduced extend the original ones without altering the behavior of the client when the network status is online. |
Yes. I like the idea. Any reason why users will need to use custom replication protocol in execute? I see that you can change this to use the same graphql mutations and url. I meant there could be some motivation for that use case, but overal framework will be much simpler if offline data will be replicated seamlessly they same way. Are you familiar wityh the concept of the Apollo-link-queue? It could seriously simplify your library. |
This sounds amazing! |
are you talking about link: httpLinkOffline in https://github.com/morrys/wora/tree/master/packages/apollo-offline#apollo-client-with-offline-options ? |
Yes. |
it is not mandatory to enter this option, by default the same link is used to execute mutations online. I gave this opportunity just to give the possibility to insert custom logics for offline mutations. |
I could tell you a thousand possible solutions of use but without a requirement and / or a problem it is useless. |
That is a really interesting approach. Is this global handler then or we can apply this with UI binding? Can I use Apollo component in react with this? How enqueueing happens? When I hit client.mutate() and I'm offline do I get any response in promise or error or this will be blocked until the change is replicated to server? I think I'm getting the entire framework slowly and this looks impressive. |
Checked example: https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/components/TodoOffline.js It looks like there will be couple migration steps require to use it starting from vanilla Apollo application. It will be easy to avoid that IMHO assuming that offline mutations are not blocking. |
Queuing occurs asynchronously and responds to the UI with the optimistic response. It does not keep the ui locked and absolutely does not wait for any response from the server. Execution is performed in the background once the connection becomes available (and it is also possible to manage it manually). |
this react component is the one I talk about in this comment: #3 (comment) |
to use the library this class is enough: https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/apollo/index.js and this: https://github.com/morrys/offline-examples/blob/master/apollo/todo/client/src/app.js#L65-L68 as documented here: |
Can you provide more info how you see offline functionalities being developed and how you see future of this library going forward?
Any info will be useful
The text was updated successfully, but these errors were encountered: