Skip to content

Instantly share code, notes, and snippets.

@erdeszt
Last active November 25, 2022 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erdeszt/61ad0ba91c949154e223e9056e11aa8b to your computer and use it in GitHub Desktop.
Save erdeszt/61ad0ba91c949154e223e9056e11aa8b to your computer and use it in GitHub Desktop.
graph
digraph {
editAgreement [shape=box];
addCoInsureeToAgreement [fillcolor=aquamarine, style=filled];
updateRelatedUser [fillcolor=aquamarine, style=filled];
addAgreementCoInsuree [fillcolor=aquamarine, style=filled];
updateAgreementCoInsuree [fillcolor=aquamarine, style=filled];
relationship_addRelatedUserAction [fillcolor=aquamarine, style=filled];
removeAgreementCoInsuree [fillcolor=aquamarine, style=filled];
handleAgreementSpouseEdit [fillcolor=aquamarine, style=filled];
handleAgreementChildrenEdit [fillcolor=aquamarine, style=filled];
handleAgreementRoommatesEdit [fillcolor=aquamarine, style=filled];
handleAgreementAddressEdit [fillcolor=aquamarine, style=filled];
handleRemovedTravelCoInsured [fillcolor=aquamarine, style=filled];
persistAgreementChanges [fillcolor=aquamarine, style=filled];
trackEdit [fillcolor=aquamarine, style=filled];
AgreementEventSender_publishAgreementEdited [fillcolor=aquamarine, style=filled];
AgreementEdiOps_sendEdiAgreementEditedAction [fillcolor=aquamarine, style=filled];
editAgreement -> HomeAgreementOperationsLegacy_getUserHomeAgreementQuery;
HomeAgreementOperationsLegacy_getUserHomeAgreementQuery -> HomeAgreementOperationsLegacy_getRawUserHomeAgreementData;
editAgreement -> referral_Queries_previewReferralDiscountsForPremium;
referral_Queries_previewReferralDiscountsForPremium -> Agreement_getCurrentActiveAgreement;
editAgreement -> validateAndApplyChanges;
validateAndApplyChanges -> AgreementDifferenceOps_getValidatedAgreementDifference;
editAgreement -> persistAgreementChanges;
persistAgreementChanges -> handleAgreementAddressEdit;
persistAgreementChanges -> handleAgreementSpouseEdit;
handleAgreementSpouseEdit -> updateAgreementCoInsuree;
updateAgreementCoInsuree -> updateRelatedUser;
updateRelatedUser -> addCoInsureeToAgreement;
handleAgreementSpouseEdit -> addAgreementCoInsuree;
addAgreementCoInsuree -> relationship_addRelatedUserAction;
addAgreementCoInsuree -> addCoInsureeToAgreement;
handleAgreementSpouseEdit -> removeAgreementCoInsuree;
handleAgreementSpouseEdit -> addCoInsureeToAgreement;
persistAgreementChanges -> handleAgreementRoommatesEdit;
handleAgreementRoommatesEdit -> updateAgreementCoInsuree;
handleAgreementRoommatesEdit -> addAgreementCoInsuree;
persistAgreementChanges -> handleAgreementChildrenEdit;
handleAgreementChildrenEdit -> updateAgreementCoInsuree;
handleAgreementChildrenEdit -> addAgreementCoInsuree;
persistAgreementChanges -> handleRemovedTravelCoInsured;
editAgreement -> handleChangeInAgreementPrice;
handleChangeInAgreementPrice -> voidUnpaidAgreementPaymentsA;
handleChangeInAgreementPrice -> handleChangedAgreementDiscounts;
editAgreement -> AgreementEdiOps_sendEdiAgreementEditedAction;
editAgreement -> trackEdit;
editAgreement -> AgreementEventSender_publishAgreementEdited;
}
// Payment dependencies
// Visualizer: https://dreampuf.github.io/GraphvizOnline/
digraph {
subgraph cluster_createTravelPayment_getUserPaymentMethodA {
createTravelPayment;
getUserPaymentMethodA;
CreateTravelPayment;
Trip_createTravelPayment;
Trip_getEndTripAction;
Trip_getEndTripIfHomeAction;
Trip_getProcessTripDayAction;
ProcessTripDayOps_processTripDays;
LogTripDays_logTripDays;
Trip_processTripDay;
LogTripDayForUser;
BackOfficeTravelLive_endTripForCustomer;
TravelSchema;
}
subgraph cluster_editCoreAgreement {
CreateAgreementV4_createAgreementV4
ReplaceInactiveAgreement_replaceAgreementV2
Agreement_replaceInactiveAgreement
EditAgreementOps_voidUnpaidAgreementPaymentsA
createAgreementPayment
voidPaymentsByIdDBIO
Notifier
insertPaymentAndDiscountsUsedAndFreeMonthCreditAction
refundPayment
EditAgreementOps_handleChangeInAgreementPrice
EditAgreementOps_editAgreement
agreement_v2_operations_editAgreement
EditAgreement_editAgreementV4
EditAgreementOps_handleChangedAgreementDiscounts
updateDiscountedAmount
captureAgreementPayment
capturePaymentV2
capturePaymentV3
captureSubscriptionRecurringPayment
}
// Entry points:
// DBIOAction
// light green = has zio version
// gold = has zio alternative but not 100% same logic
refundPayment [shape=box, color=red, fillcolor=gold, style=filled];
voidPaymentsByIdDBIO [shape=box, color=red, fillcolor=aquamarine, style=filled];
updateDiscountedAmount [shape=box, color=red, fillcolor=aquamarine, style=filled];
createAgreementPayment [shape=box, color=red, fillcolor=aquamarine, style=filled];
captureSubscriptionRecurringPayment [shape=box, color=red, fillcolor=aquamarine, style=filled];
captureAgreementPayment [shape=box, color=red, fillcolor=aquamarine, style=filled];
getUserPaymentMethodA [shape=box, color=red];
insertPaymentAndDiscountsUsedAndFreeMonthCreditAction [shape=box, color=red, fillcolor=aquamarine, style=filled];
createTravelPayment [shape=box, color=red];
capturePaymentV3 [shape=box, color=red, fillcolor=aquamarine, style=filled];
capturePaymentV2 [shape=box, color=red, fillcolor=aquamarine, style=filled];
// Top level users:
// Maintenance app:
Notifier [shape=hexagon];
CreateTravelPayment [shape=hexagon];
LogTripDayForUser [shape=hexagon];
// Graphql query:
TravelSchema [shape=house, color=orange];
EditAgreement_editAgreementV4 [shape=house];
CreateAgreementV4_createAgreementV4 [shape=house];
ReplaceInactiveAgreement_replaceAgreementV2 [shape=house];
LogTripDays_logTripDays [shape=house];
// Dependencies:
EditAgreementOps_handleChangeInAgreementPrice -> EditAgreementOps_editAgreement;
EditAgreementOps_editAgreement -> agreement_v2_operations_editAgreement;
agreement_v2_operations_editAgreement -> EditAgreement_editAgreementV4;
refundPayment -> EditAgreementOps_handleChangeInAgreementPrice;
voidPaymentsByIdDBIO -> EditAgreementOps_handleChangeInAgreementPrice;
voidPaymentsByIdDBIO -> EditAgreementOps_voidUnpaidAgreementPaymentsA;
EditAgreementOps_voidUnpaidAgreementPaymentsA -> EditAgreementOps_handleChangeInAgreementPrice;
voidPaymentsByIdDBIO -> Agreement_replaceInactiveAgreement;
Agreement_replaceInactiveAgreement -> Notifier;
Agreement_replaceInactiveAgreement -> CreateAgreementV4_createAgreementV4;
Agreement_replaceInactiveAgreement -> ReplaceInactiveAgreement_replaceAgreementV2;
updateDiscountedAmount -> EditAgreementOps_handleChangedAgreementDiscounts;
EditAgreementOps_handleChangedAgreementDiscounts -> EditAgreementOps_handleChangeInAgreementPrice;
createAgreementPayment -> EditAgreementOps_handleChangeInAgreementPrice;
captureSubscriptionRecurringPayment -> EditAgreementOps_handleChangeInAgreementPrice;
captureAgreementPayment -> EditAgreementOps_handleChangeInAgreementPrice;
getUserPaymentMethodA -> CreateTravelPayment;
getUserPaymentMethodA -> EditAgreementOps_handleChangeInAgreementPrice;
getUserPaymentMethodA -> Trip_createTravelPayment;
Trip_createTravelPayment -> Trip_getEndTripAction;
Trip_getEndTripAction -> Trip_getEndTripIfHomeAction;
Trip_getEndTripIfHomeAction -> Trip_getProcessTripDayAction;
Trip_getProcessTripDayAction -> Trip_processTripDay;
Trip_processTripDay -> LogTripDayForUser;
Trip_getProcessTripDayAction -> ProcessTripDayOps_processTripDays;
ProcessTripDayOps_processTripDays -> LogTripDays_logTripDays;
Trip_processTripDay -> BackOfficeTravelLive_endTripForCustomer;
BackOfficeTravelLive_endTripForCustomer -> TravelSchema;
insertPaymentAndDiscountsUsedAndFreeMonthCreditAction -> EditAgreementOps_handleChangedAgreementDiscounts;
insertPaymentAndDiscountsUsedAndFreeMonthCreditAction -> EditAgreementOps_handleChangeInAgreementPrice;
createTravelPayment -> CreateTravelPayment;
createTravelPayment -> Trip_createTravelPayment;
capturePaymentV3 -> EditAgreementOps_handleChangeInAgreementPrice;
capturePaymentV2 -> EditAgreementOps_handleChangeInAgreementPrice;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment