Skip to content
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

Renamed map and mapper properties to __map and __mapper, to avoid conflicts with graphql schemas containing those properties #13369

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

sc0ttdav3y
Copy link

Description of changes

This PR addresses the issue reported in aws-amplify/amplify-category-api#1676, where any valid Graphql schema containing a property called either map or mapper will crash without error in the appsync simulator.

Issue #, if available

aws-amplify/amplify-category-api#1676

Description of how you validated changes

The problem is that the velocity implementation stores the graphql data in an object that also has private objects called generic names. The fix is to name them with a double-underscore to indicate they are not part of userland payloads.

Testing

I have run the current test suite, but have not written a new test for this change.

I have also been using this locally on a production schema for a few months and it's working as intended. In fact, I rely upon it :-)

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

… problem with Graphql schemas having those properties breaking the simulator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant