urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.61k stars 450 forks source link

Not able to use my production endpoint #2211

Closed hexdecimal16 closed 2 years ago

hexdecimal16 commented 2 years ago

urql version & exchanges: 2.0.6

Steps to reproduce

  1. initialise a react native project using expo
  2. use https://api.stacket.in:4000/graphql as the endpoint

Expected behavior should be able to retrive data

Actual behavior [CombinedError: [Network] Network request failed]

JoviDeCroock commented 2 years ago

Just tried in both

Seems to work correctly, we'll need more information to help you out 😅

hexdecimal16 commented 2 years ago

Just tried in both

Seems to work correctly, we'll need more information to help you out sweat_smile

I am attaching my dependencies


  "dependencies": {
    "@apollo/client": "^3.5.7",
    "@apollo/react-hooks": "^4.0.0",
    "@expo/metro-config": "^0.3.9",
    "@kanzitelli/if-component": "^0.3.0",
    "@react-native-async-storage/async-storage": "^1.15.14",
    "@react-native-community/clipboard": "^1.5.1",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "7.1.3",
    "@react-native-picker/picker": "^2.2.1",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "@react-navigation/stack": "^6.0.11",
    "apollo-cache-inmemory": "^1.6.6",
    "apollo-client": "^2.6.10",
    "apollo-link-http": "^1.5.17",
    "aws-amplify": "^4.3.12",
    "aws-amplify-react-native": "^6.0.2",
    "date-fns": "^2.28.0",
    "expo": "^44.0.0",
    "expo-blur": "~11.0.0",
    "expo-dev-client": "~0.8.0",
    "expo-font": "~10.0.4",
    "expo-localization": "~12.0.0",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "expo-updates": "~0.11.5",
    "formik": "^2.2.9",
    "graphql": "^16.2.0",
    "graphql-tag": "^2.12.6",
    "i18n-js": "^3.8.0",
    "lodash": "^4.17.21",
    "mobx": "^6.3.12",
    "mobx-persist-store": "^1.0.4",
    "mobx-react": "^7.2.1",
    "react": "17.0.1",
    "react-apollo": "^3.1.5",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-confirmation-code-field": "^7.2.0",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-mmkv": "1.3.2",
    "react-native-reanimated": "~2.3.1",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-shadow-2": "^6.0.0",
    "react-native-ui-lib": "^6.7.0",
    "react-native-web": "0.17.1",
    "rn-bounceable": "^1.1.0",
    "unique-names-generator": "^4.6.0",
    "urql": "^2.0.6",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@expo/config-plugins": "^4.0.15",
    "@expo/webpack-config": "~0.16.2",
    "@react-native-community/eslint-config": "^3.0.1",
    "@types/i18n-js": "^3.8.2",
    "@types/lodash": "^4.14.178",
    "@types/react": "~17.0.21",
    "@types/react-dom": "~17.0.9",
    "@types/react-native": "~0.64.12",
    "@typescript-eslint/parser": "^5.9.0",
    "dotenv-cli": "^4.1.1",
    "prettier": "^2.4.1",
    "release-it": "^14.11.8",
    "typescript": "~4.3.5"
  }
hexdecimal16 commented 2 years ago

Just tried in both

Seems to work correctly, we'll need more information to help you out sweat_smile

https://snack.expo.dev/@dhairy/sandbox-react-native Here is an example of the error. It is important to note the error only showes when making any query not while defining client

JoviDeCroock commented 2 years ago

The sandbox you linked just works 😅 image

hexdecimal16 commented 2 years ago

The sandbox you linked just works sweat_smile image

yes it works ! But when I am trying to use with this starter kit it gives error https://github.com/kanzitelli/expo-starter

hexdecimal16 commented 2 years ago

The sandbox you linked just works sweat_smile image

ss

please try to run on android and see if it works