workaround for AppSync 'design flaw' which loses resolvers #51
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.
* resolver = the code that maps requests/responses for the a datasource (such as DynamoDB) from/to the GraphQL payloads.
For a while now we've been observing 'AppSync resolvers' occasionally getting disconnected when cloudforming (following changes to the GraphQL schema). This has been raised by others in aws/aws-appsync-community#146, apparently this is 'by design' according to aws/aws-appsync-community#146 (comment), some argue it's a bug others have called this a 'design flaw', but whatever it's called it's super annoying, as it causes pretty much all of pinboard to break 👿 (and requires us to manually re-add the resolvers).
What does this change?
This PR aims to workaround this problem by including an md5 checksum of the GraphQL Schema as a comment in all of the resolvers, somewhat inspired by sid88in/serverless-appsync-plugin#225 (comment) (but unlike that suggestion our solution won't cause cloudformation step for every deploy, as we don't change the schema that often).
How to test
Deploy this branch to


CODE
, in the AWS Console, when looking atpinboard-appsync-api-CODE
in the AppSync area, look inside the Schema section and scroll down the resolvers on the right to find theQuery
andMutation
sections...... clicking any of those links should take you to the corresponding resolver, for each either the request/response template should include a comment like...
How can we measure success?
More stability when releasing 🙏