Comments (7)
iOS is hanging, though.
The thing is: Apollo Client doesn't contain any code that would execute differently between iOS or Android.
Since it works on Android, and you are seeing the same problem with TanStack Query on iOS, I would assume that this is some kind of bug with React Native and iOS.
Unfortunately, that's out of our control. You'd have to bring that up over in the React Native or Expo repositories.
Since there is nothing we can do about it, I'm closing this issue here. I hope you find a fix soon!
from apollo-client.
That is indeed weird.
Can you reproduce that behaviour with https://github.com/apollographql/rn-apollo-client-testbed, too?
Ideally, I'd need to see this actually happening, so I really need a reproduction that I can execute on my machine.
from apollo-client.
I didn't attempt within rn-apollo-client-testbed
. I did manage to clone it down and attempted to get the query to work but this kinda defeats the purpose of getting a graphql endpoint fully functioning on a raw react-native
project. I would be curious to see if you can reproduce it by npx create-expo-app FreshApp
and then configuring a basic Apollo Client and hitting a public endpoint like https://api.github.com/graphql
.
There is a bit too much boilerplate with the testbed and quirks to get it running in development. If it was as simple as cloning installing and running npm run dev
but I get something like No development build
etc etc.
I am attempting to hit a public facing endpoint which has no problem retrieving data via iQL and other methods. I am curious if this is metro getting in my way or if it is apollo/client.
Oddly enough, I attempted this with Tanstack react-query and produced the same results (always pending). So maybe it has something to do with react-native 0.73.4?
I appreciate the rapid response on this though!
from apollo-client.
https://github.com/Johnsgaard/fogtown-rn
here is a public repo with the most basic setup you can have.
git clone [email protected]:Johnsgaard/fogtown-rn.git
cd fogtown-rn
npm install
npm run ios
assuming you have the expo cli
from apollo-client.
Also, as a side note. I have gotten a graphql api to work with a previous project but I used apollo-boost
at the time.
Here was the previous dependencies for that project:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@apollo/react-hooks": "^3.1.3",
"@expo/vector-icons": "^12.0.0",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.0.0",
"@react-navigation/native": "^5.0.0",
"@react-navigation/stack": "^5.0.0",
"@react-navigation/web": "~1.0.0-alpha.9",
"apollo-boost": "^0.4.7",
"bad-words": "^3.0.4",
"expo": "^41.0.0",
"expo-asset": "~8.3.1",
"expo-auth-session": "^3.2.3",
"expo-constants": "~10.1.3",
"expo-font": "~9.1.0",
"expo-haptics": "~10.0.0",
"expo-linear-gradient": "~9.1.0",
"expo-linking": "~2.2.3",
"expo-notifications": "~0.11.6",
"expo-random": "~11.1.2",
"expo-web-browser": "~9.1.0",
"graphql": "^14.6.0",
"jwt-decode": "^2.2.0",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-autoheight-webview": "^1.4.2",
"react-native-gesture-handler": "~1.10.2",
"react-native-keyboard-aware-scroll-view": "^0.9.2",
"react-native-linear-gradient": "^2.5.6",
"react-native-reanimated": "~2.1.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-snap-carousel": "^4.0.0-beta.4",
"react-native-spacer": "^1.7.0",
"react-native-svg": "12.1.0",
"react-native-svg-animations": "^0.2.5",
"react-native-swipe-gestures": "^1.0.5",
"react-native-swipe-list-view": "^2.5.0",
"react-native-web": "~0.13.12",
"react-native-webview": "11.2.3",
"react-native-webview-autoheight": "^1.0.6",
"unimodules-permissions-interface": "~6.1.0"
},
"devDependencies": {
"@babel/core": "~7.9.0",
"babel-preset-expo": "8.3.0",
"jest-expo": "^41.0.0"
},
"private": true
}
from apollo-client.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
from apollo-client.
Thank you for taking a look! I hope so too!
from apollo-client.
Related Issues (20)
- Tracking issue: `gql.tada` HOT 1
- @defer not working in React Native HOT 19
- Apollo client initiated requests since apollo client v3.9.2 in Nextjs sometimes render as undefined data HOT 8
- useFragment fails to get data from cache for an Interface, even when possibleTypes is setup correctly HOT 5
- Better types MockedResponse.newData HOT 2
- graphql union type extraction fragment doesn't get mapping field values HOT 3
- Question about using useTransition with useSuspenseQuery's refetch and fetchMore after SSR HOT 2
- Error while build the angular app with SSR HOT 1
- `ObservableQuery` `setVariables`/`reobserve` with new variables reports partial data unexpectedly
- Invariant Violation: An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#%7B%22version%22%3A%223.9.4%22%2C%22message%22%3A49%2C%22args%22%3A%5B%5D%7D HOT 8
- offsetLimitPagination helper is not using cache in some cases HOT 2
- Better documentation on `queryDeduplication` HOT 1
- useFragment invalid return value in the case of null or undefined id in the from argument HOT 1
- Refetch with New Variables Overrides Other Existing Refetches HOT 3
- Increase the timeout for a request. HOT 6
- Apollo Client `MockedProvider` unable to mock alias fields HOT 6
- `client.query`, `fetchMore`, and others suffer from unhandled promise rejections
- when apollo client query failed, it exit all the process and cannot catch the error HOT 1
- Field Policies: 'undefined' return value for `read` affects other field policy `read` return values. HOT 2
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 apollo-client.