Comments (4)
You could also use Redux Offline.
https://medium.com/@east5th/offline-graphql-queries-with-redux-offline-and-apollo-4837065307f2
from chatty.
@cybercoder thanks for this! realm
is definitely cool -- truly impressive software.
My intention with this tutorial was to introduce basic concepts around how to write GraphQL and React Native code. The step-by-step piece here is to give people an understanding of how each piece fits with the others before it because I've found that many tutorials just show one or two concepts, but not how it all fits together. I've had quite a few people ask me if this code is production ready, and that's really just not what I was attempting here. I chose WhatsApp for the tutorial example because it has a lot of feature requirements that hit on core concepts here -- subscriptions, auth, pagination, different screen types, etc.
If the project were to make a bona-fide messenger app, by all means I would look to use something like realm
, but this project is really about teaching the basics of React Native and GraphQL. However, I think it would be great to direct devs to check out tech like realm
somewhere in the tutorial. People sometimes construe the tutorial to be a prescriptive guide to making a real-time messaging app, and it would be good to clarify that there's already great infrastructure out there that will take you 90% of the way there out of the box.
As for Steps 9+, I wrote a bunch of code back in the day (with push notifications, etc.) but found it incredibly difficult to maintain this project with just 8 steps, so I've tabled the rest.
from chatty.
Actually, It is better to use realm
and it's event listener on objects. A global subscription for message receiving messages and insert it in realm storage. Here is some challenges
One of them is how we can determine which message object we should upgrade it's sent flag after mutation response to show delivery check mark. I hate to use a client side uuid as sending message identifier. hmmm
You can see my attempt to implement it: https://github.com/cybercoder/3cho
from chatty.
Yes, I know, and This is great tutorial and nice with no doubt. My point is there is too many challenges on production ready messenger app. I made some researches and i found WhatsAPP
is using XMPP
protocol for messaging. The main and key point is http is not a good choice for a production ready messaging app. So i'm looking for apollo clients which using MQTT
or XMPP
but there's no choices. Another Solution i found is ``òpenFire```which using xmpp and there is a js client for that, but it is out of graphql.
Warm Regards.
from chatty.
Related Issues (20)
- Step 12: GraphQL File Uploads
- Android support HOT 1
- Step 11: add push notifications for new group
- Step 6: add SubscriptionEvent interface and organize subscriptions
- Add friends via phone contacts
- Send photo, audio, and video messages! HOT 1
- Convert project to Expo HOT 11
- Upgrade database? HOT 3
- Subscriptions with Redis HOT 2
- apollo-client v2 HOT 3
- Tutorial upgraded to [email protected] HOT 4
- undefined is not an object (evaluating 'action.payload.auth') HOT 2
- Hi all, please check help me, i want to create new function find friend, but i has an issues as photo, so i don't know handler data when server response.
- Encountered a sub-selection on the query, but the store doesn't have \ an object reference HOT 4
- react native client install error. HOT 2
- [Network error] Android HOT 2
- Update Steps 1-8 with latest Apollo, React Native, updated APIs
- Is it as fast as WhatsApp ?
- any preview??
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatty.