Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
React native deployments include a process to minify the code. This causes join monster to fail: #250. There are work arounds as described in that issue. This PR fixes the issue so that the work arounds are no longer needed.
To fix the problem we replace the calls to the
constructor.name
with calls that leverage some utility functions provided by graphql that provide equivalent behavior but are minify safe. So for example the followingcan be replace with:
We create a utility function that handles a list of the checked types (as this is done in the code).
References
Testing
This has been tested with regression tests and in a separate repository I tested it with expo. The default
expo start
does not invoke minify, butexpo start --no-dev --minify
does. I reproduced it first, and then tested that the code works correctly using minify.Checklist