Giter Club home page Giter Club logo

Comments (7)

phryneas avatar phryneas commented on May 24, 2024 1

It works for me with Android
image

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.

phryneas avatar phryneas commented on May 24, 2024

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.

Johnsgaard avatar Johnsgaard commented on May 24, 2024

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.

Johnsgaard avatar Johnsgaard commented on May 24, 2024

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.

Johnsgaard avatar Johnsgaard commented on May 24, 2024

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.

github-actions avatar github-actions commented on May 24, 2024

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.

Johnsgaard avatar Johnsgaard commented on May 24, 2024

Thank you for taking a look! I hope so too!

from apollo-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.