I am working on an react native app where I need some local persistence. Realm looks like a good option. I also have Relay/GraphQL for the app. Relay has its own cache manager, but the cache data has to be fetched from the Realm db. Can someone please let me know if there is a transformation tool that can convert the data fetched from Realm db to Relay appropriate content?
Thanks in advance.
There's no existing transformation tool to my knowledge that integrates Realm with Relay.
This project allows you to serve GraphQL from a Realm server: https://github.com/realm/realm-graphql-service
Related
In order to quickly prototype ideas for a personal project I'm interested in a solution where I use Prisma directly from a react native app. (I'm aware this is not something you'd do in production.) Data for the single user app would be stored in some free SQL cloud DB. I would store auth information locally in the client.
Is this possible just like it would be possible in a nodejs Cli or webapp?
Currently Prisma only works on servers so you would need to use it on Node. There's a request for react-native support so you can add upvote the request.
So I wrote an app in React Native. Now I have my Django Rest framework and a mysql database. I know: I should pay a hosting service to host my database and put the React Native code in the playstore. (This is meant symbolically) But Now I still have the Django Rest framework project - where should I store that? I may also have profile images in the app. Where should I store those? Sorry if the question seems a bit silly
You just need to get a webserver. For example Digital Ocean or Amazon Webservice, etc.. There you have to upload the project and you access the website over your own domain e.g.: www.yourproject.com
Now you can use your urls for example
www.yourproject.com/api/user
I hope I could help you
There seem to be no direct support for React Native through Cosmos DB SDK or npm packages. The JS package #azure/cosmos while works on React Native for the Web, but does not build for the native apps. It fails to build due to Cryto incompatibility.
While Resource Tokens can serve as a solution for authentication, but App still needs to interact with the DB resources using an API.
So, how to go around this? Is utilizing Azure Functions as a mid-tier the only workaround?
Thanks
If you need basic functionality like querying, creating new items etc, you can get the react-native-azure-cosmos package.
However the functionality is a very limited subset of the full JS SDK.
There is no official SDK for now to target react native applications.
You will need to use an API App or Function app to interact with CosmosDB and call the HTTP endpoints from your device.
I've recently decided to try and make a universal app with expo supporting ios, android and web altogether.
I knew that there would be many hick ups along the way.. but I found the biggest problem from the start.
I can see that there are few options as where to store the access token for apps such as secure store or asyncStorage, I just simply can't find a way to work with cookies or any client side store to put in the access-token.
As my app should have the stay logged in feature essentially, this will be a critical problem for the web client.
Does anybody know a good workaround this matter, or is there a way to keep the users logged in from the server side using the device / ip detail..?
Please enlighten me guys!
The web support is available in asyncStorage since v1.9.0.
So you can use it in recent versions of asyncStorage.
I've managed to do this with AsyncStorage.
import AsyncStorage from '#react-native-community/async-storage';
/// Then inside your component make an asynchronous set
await AsyncStorage.setItem(['tokenName', tokenValue]);
I am new in graphql, would you please help me, I have a server for myself. I want to know may I use express-graphql for the server-side code and get query in a reactnative(mobile app) application through Apllo client?
Yes, there is no problem using React Native as the frontend for your Express server. You can connect your GraphQL either with Apollo or Relay Modern. There are other options for server side, like Koa (http://koajs.com/)
GraphCool is also an easy to go platform to build your server: https://www.graph.cool/
You can find amazing tutorials here: https://www.howtographql.com/
This post is really good to get started too: https://dev-blog.apollodata.com/full-stack-react-graphql-tutorial-582ac8d24e3b
Or you can follow the official docs of Apollo GraphQL: https://www.apollographql.com/docs/react/
Or Learn Apollo docs: https://www.learnapollo.com/tutorial-react/react-01/
Hope it helps.