prisma-archive / react-native-fullstack-graphql Goto Github PK
View Code? Open in Web Editor NEW๐ Starter projects for mobile applications based on React Native & GraphQL.
๐ Starter projects for mobile applications based on React Native & GraphQL.
As found by Nilian, http://stackoverflow.com/questions/38153335/react-native-loading-image-over-https-works-while-http-does-not-work .
Server side should verify thant imageUrl is https, otherwise on RN side, a rewrite rule can be implemented in Post.js
render () {
return (
<View style={{flex: 1, width: 150, height: 150}}>
<Image
source={{ uri: this.props.post.imageUrl.replace(/^http:\/\//i, 'https://') }}
style={{flex: 1, width: 150, height: 150}}
/>
<Text>{this.props.post.description}</Text>
</View>
)
}
Receiving following error from the authentication-with-auth0-and-apollo example:
Versions:
Steps to reproduce:
yarn
in main directoryAUTH0_CLIENT_ID
and AUTH0_DOMAIN
as described herelogin
as shown [here] (http://i.imgur.com/8e2tPxq.png)Expected behavior:
Solution:
Add the following import to .../android/app/src/main/java/com/auth0example/MainApplication.java:
import com.auth0.lock.react.LockReactPackage;
In the same MainApplication.java file, add the LockReactPackage()
module as shown below:
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
//Other RN modules
new LockReactPackage()
);
}
<application>
tag:<!--Auth0 Lock-->
<activity
android:name="com.auth0.lock.LockActivity"
android:theme="@style/Lock.Theme"
android:screenOrientation="portrait"
android:launchMode="singleTask">
</activity>
<!--Auth0 Lock End-->
<!--Auth0 Lock Embedded WebView-->
<activity
android:name="com.auth0.identity.web.WebViewActivity"
android:theme="@style/Lock.Theme">
</activity>
<!--Auth0 Lock Embedded WebView End-->
<!--Auth0 Lock Passwordless-->
<activity
android:name="com.auth0.lock.passwordless.LockPasswordlessActivity"
android:theme="@style/Lock.Theme"
android:screenOrientation="portrait"
android:launchMode="singleTask">
</activity>
<activity
android:name="com.auth0.lock.passwordless.CountryCodeActivity"
android:theme="@style/Lock.Theme">
</activity>
<!--Auth0 Lock Passwordless End-->
Note:
Receiving following error from the authentication-with-auth0-and-apollo example:
Versions:
Steps to reproduce:
yarn
in main directoryExpected behavior:
Solution:
android{ ... }
section in the .../android/app/build.gradle file:packagingOptions {exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE'}
Note:
Hi! Thanks for this project!
There are some warnings after "yarn install" in authentication-with-auth0-and-apollo project:
warning "[email protected]" has incorrect peer dependency "[email protected] || 15.* || ^15.0.0".
warning "[email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0".
warning "[email protected]" has incorrect peer dependency "react@^15.5.4".
warning "[email protected]" has incorrect peer dependency "react@^0.13.0 || ^0.14.0 || ^15.0.0".
Also when I was trying to do "react-native run-ios" I got this error:
Found Xcode workspace ReactNativeApolloAuth0Example.xcworkspace
Launching iPhone 6 (iOS 10.3)...
Building using "xcodebuild -workspace ReactNativeApolloAuth0Example.xcworkspace -configuration Debug -scheme ReactNativeApolloAuth0Example -destination id=BDE6F8BB-F5F4-4ECE-A539-3DDF5AAD8B2E -derivedDataPath build"
User defaults from command line:
IDEDerivedDataPathOverride = /Users/stan/react-native-graphql/react-native-graphql/authentication-with-auth0-and-apollo/ios/build
xcodebuild: error: The workspace named "ReactNativeApolloAuth0Example" does not contain a scheme named "ReactNativeApolloAuth0Example". The "-list" option can be used to find the names of the schemes in the workspace.
Installing build/Build/Products/Debug-iphonesimulator/ReactNativeApolloAuth0Example.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/ReactNativeApolloAuth0Example.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
So I unable to start this project :(
Hello,
I try to use this cool auth example, but after clicking on login with google, the loader id displayed and never stop.
if i clic on done (top screen) to hide the browser, i can see an error and the link go back to expo home
i have this error :
no experience found at exp://url....exp.direct/+/redirect
detail : error while loading : Tunnel exp://url....exp.direct/+/redirect#access_token=my_token, code 404
i run the code in ios simulator iphone 7
with xde on mac
thx for your time and your help
I followed all the steps and stumbled on import Exponent from 'exponent'
I supected it will fail and it did:
Unhandled Promise Rejection (id:0): Invalid token specified
Additionally, note that auth0 decommissioned legacy API and Expo example is broken too.
May be it's time to make an example using GraphCool email/password with Expo 20.0.0 :)
The npm package react-native-lock
has been deprecated in favor of react-native-auth0
. In practice, this is a breaking change, as the old API cannot be used with newly created clients. This means that new users working through the examples are unable to get the "Authentication with Auth0 and Apollo" example to function.
Request replacement of react-native-lock
with react-native-auth0
following guidelines from the Auth0 React-Native repo.
On registry https://registry.npmjs.org/
, the "latest" version (v1.0.8) of dependency apollo-client-preset
has the following deprecation notice:
for the best quick start with Apollo Client, please use apollo-boost instead
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.
Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using apollo-client-preset
as-is, please add it to your ignoreDeps array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs.
if (this.props.location.key !== nextProps.location.key) {
this.props.feedQuery.refetch()
}
}
Thank you so much for the react-native-graphql
example! :)
It clarifies a lot for me.
But I'm still struggling with the integration of react-community/react-navigation
...
For more complex apps theres no way around a stack navigator and the React Navigation is the de facto standard.
Maybe you could add it to this example or create another that uses it?
There is an issue with fetch in React Native that prevents the usage of localhost
.
A proposed solution is to use Platform.select
to set the ApolloClient's HttpLink
uri to one of several options:
const SERVER_URL = __DEV__
? Platform.select({
ios: 'GET_USERS_IP_ADDRESS_AND_APPEND_PORT_4000',
android: 'http://10.0.2.2:4000'
})
: 'USE_PRODUCTION_GRAPHQL_SERVER_ENV_VAR';
Android apparently allows 10.0.2.2 to equal localhost, but I haven't confirmed this myself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.