-
-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document that Symbol polyfill is required to use in React Native/old browsers #535
Comments
Looks like RN doesn't have https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol Looks like this is an issue with React Native: facebook/react-native#4676 A fix is suggested here: facebook/react-native#4676 (comment) Maybe we can just add docs for the relevant polyfill? It's supported in all modern browsers so it seems silly to avoid using |
That fix introduces other errors, as mentioned in the same thread. Those issues are still not fixed. Since RN is notioriously slow in fixing stuff, I'm afraid the solution needs to be on the side of |
Is there any way to polyfill We could certainly stop using it in this package, but I'd really prefer to be able to rely on modern JavaScript stuff if we can. Maybe let's take a day to look for that solution, and then we can maybe have a PR to remove Symbol if we don't find any external solution. |
Here is a polyfill can be use https://github.com/seanmonstar/symbol/blob/master/README.md |
@kbrandwijk I think that bug has been fixed: facebook/react-native#11968 |
Can anyone try the fix on React Native, and see if it resolves the issue? If so, we can add a section to the docs. |
Yep, it works on React-Native 0.51. https://snack.expo.io/@giautm/symbol-test @ReggaePanda : which version of react-native are you using? |
From his repo: 0.51.0 |
Awesome, someone want to send a PR here? Right under the install directions I'd put a small "polyfills" heading: https://github.com/apollographql/graphql-tools/blob/master/docs/source/index.md |
@giautm this is the output from
|
@stubailo
(Note: it works in Expo, so they must be doing something to accommodate.) It would be a lot less painful for RN developers (which I would think make up a large portion of Apollo users, given GraphQL's benefits on mobile) if the use of |
Should be fixed in next version. |
I try to mocking queries on client side (for developing).
it works on web and iOS. on android I get the following message only by adding this line in code without other changes.
import { makeExecutableSchema, addMockFunctionsToSchema } from 'graphql-tools';
The text was updated successfully, but these errors were encountered: