aws-cloudformation / community-registry-extensions

MIT No Attribution
85 stars 27 forks source link

Add schema breaking change detection hook for AWS::AppSync::GraphQLSchema #243

Closed ndejaco2 closed 8 months ago

ndejaco2 commented 9 months ago

Issue #, if available:

Description of changes: Add AppSync_BreakingChangeDetection hook. This hook compares the old AWS::AppSync::GraphQLSchema with the new AWS::AppSync::GraphQLSchema pre-update and determines whether there is a breaking change or not. Breaking changes are ones that are not backwards compatible with existing clients such as removing a field or type.

Tests output excerpts

Unit tests excerpts

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  28.444 s
[INFO] Finished at: 2023-10-06T14:03:30-07:00
[INFO] ------------------------------------------------------------------------

Contract tests excerpts

% cfn test -v --enforce-timeout 90
collected 24 items / 20 deselected / 4 selected                                

../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/hook/handler_pre_update.py::contract_pre_update_success PASSED [ 25%]
../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/hook/handler_pre_update.py::contract_pre_update_failed PASSED [ 50%]
../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/hook/handler_pre_update.py::contract_pre_update_failed_unsupported_target SKIPPED [ 75%]
../../../../../../private/var/folders/dk/p_tlf23j3nj67z5kgkq_bzv9p_sb_d/T/resource/handler_misc.py::contract_check_asserts_work PASSED [100%]

================= 3 passed, 1 skipped, 20 deselected in 58.02s =================

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.