useSubscription throwing error 400 bad request in react native
See original GitHub issueI am working on a project that has a web portal and a react native application. at some stage, I need to get subscription data via useSubscription hook.
I used apollo client docs to configure the web socket with Graphql-Ws, that works fine in react web portal but when it comes to react-native it throws blind 400 bad request and it is hard to debug the actual network call.
my package.json looks like this:
"dependencies": { "@apollo/client": "^3.6.8", "@apollo/react-hooks": "^4.0.0", "@freakycoder/react-native-bounceable": "^0.2.5", "@freakycoder/react-native-custom-text": "0.1.2", "@freakycoder/react-native-helpers": "^1.0.2", "@react-native-async-storage/async-storage": "^1.17.6", "@react-native-community/clipboard": "^1.5.1", "@react-native-community/masked-view": "^0.1.11", "@react-native-picker/picker": "^2.4.1", "@react-navigation/bottom-tabs": "^6.0.9", "@react-navigation/native": "^6.0.6", "@react-navigation/stack": "^6.0.11", "@twotalltotems/react-native-otp-input": "1.3.7", "@types/graphql": "^14.5.0", "apollo": "^2.33.9", "apollo-link": "^1.2.14", "apollo-link-error": "^1.1.13", "apollo3-cache-persist": "^0.14.0", "axios": "^0.24.0", "events": "^3.3.0", "formik": "^2.2.9", "graphql": "^16.5.0", "graphql-ws": "^5.9.0", "jwt-decode": "^3.1.2", "moment": "^2.29.3", "react": "17.0.2", "react-native": "0.66.4", "react-native-animatable": "^1.3.3", "react-native-auth0": "^2.13.1", "react-native-calendars": "^1.1284.0", "react-native-document-picker": "^8.1.0", "react-native-dropdown-picker": "^5.4.2", "react-native-dynamic-vector-icons": "^1.1.6", "react-native-file-viewer": "^2.1.5", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "^2.1.1", "react-native-localization": "^2.1.7", "react-native-paper": "^4.12.1", "react-native-paper-dropdown": "^1.0.7", "react-native-phone-number-input": "^2.1.0", "react-native-reanimated": "^2.3.1", "react-native-rename": "^2.9.0", "react-native-safe-area-context": "^3.3.2", "react-native-screens": "^3.10.1", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^12.3.0", "react-native-svg-transformer": "^1.0.0", "react-native-vector-icons": "^9.1.0", "react-navigation-helpers": "^2.0.0", "rn-fetch-blob": "^0.12.0", "yup": "^0.32.11"
**Error:**
note!!! backend is hasura
@bruce @probablycorey @rgrove @ivank let me know if any other info is needed
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
@jpvajda Thanks, Really appreciate the way you handle things
@FaisalSeraj-techverx totally understand! As a note, we plan to increase our response time in this repo as Apollo grow’s the OSS team that supports Apollo Client, so in the near future I hope you will see a quicker overall response to questions and issues.