Description:
Fixes error handling with the new destination API. Namely, it prevents the entire page from breaking (e.g., the escalation policy details page) if any single action is invalid (e.g., archived or invalid slack channel). Instead individual chips/line items will render an error.
The purpose is to ensure in such an event, a user is able to interact with the page and take action to resolve the issue.
gql typescript generator tool was updated to support GraphQL unions
Screenshots:
Escalation Policy Details
TODAY
![image](https://github.com/target/goalert/assets/595010/efdf658e-9629-4686-9524-d9b870ecbe6c)
This PR
![image](https://github.com/target/goalert/assets/595010/20c710af-4c22-46d5-ab73-ae3b76a462a7)
![image](https://github.com/target/goalert/assets/595010/3581896a-b47f-4f21-b766-bc0df03b6d2c)
User Contact Methods
TODAY
![image](https://github.com/target/goalert/assets/595010/bf0f3726-14eb-4af8-b163-8804bb8f5f4b)
This PR
![image](https://github.com/target/goalert/assets/595010/359ace28-56fc-4666-bdd9-880956342902)
Schedule On-Call Notifications
TODAY
![image](https://github.com/target/goalert/assets/595010/e09a419b-7f0f-41a6-b58c-6fa49872b8ad)
This PR
![image](https://github.com/target/goalert/assets/595010/26dca897-e883-4609-b53f-0409352ce271)
![image](https://github.com/target/goalert/assets/595010/87e08c63-969d-4c06-9537-7d966ac07d8f)
Describe any introduced user-facing changes:
N/A fixing broken behavior
Describe any introduced API changes:
!! Breaking changes to the destination's API !!
FieldValuePair no longer contains label and isFavorite these were moved to FieldSearchResult to separate the two
Destination.displayInfo return type changed from DestinationDisplayInfo to a union of DestinationDisplayInfo and DestinationDisplayInfoError -- rather than failing the entire query with a global error, errors are now returned inline
destinationFieldSearch return type changed to FieldSearchConnection, which was renamed from FieldValueConnection to match FieldSearchResult
Additional Info:
The affected APIs are only used when the dest-types experimental flag is enabled.
Description: Fixes error handling with the new destination API. Namely, it prevents the entire page from breaking (e.g., the escalation policy details page) if any single action is invalid (e.g., archived or invalid slack channel). Instead individual chips/line items will render an error.
The purpose is to ensure in such an event, a user is able to interact with the page and take action to resolve the issue.
Screenshots:
Escalation Policy Details
TODAY ![image](https://github.com/target/goalert/assets/595010/efdf658e-9629-4686-9524-d9b870ecbe6c) This PR ![image](https://github.com/target/goalert/assets/595010/20c710af-4c22-46d5-ab73-ae3b76a462a7) ![image](https://github.com/target/goalert/assets/595010/3581896a-b47f-4f21-b766-bc0df03b6d2c)User Contact Methods
TODAY ![image](https://github.com/target/goalert/assets/595010/bf0f3726-14eb-4af8-b163-8804bb8f5f4b) This PR ![image](https://github.com/target/goalert/assets/595010/359ace28-56fc-4666-bdd9-880956342902)Schedule On-Call Notifications
TODAY ![image](https://github.com/target/goalert/assets/595010/e09a419b-7f0f-41a6-b58c-6fa49872b8ad) This PR ![image](https://github.com/target/goalert/assets/595010/26dca897-e883-4609-b53f-0409352ce271) ![image](https://github.com/target/goalert/assets/595010/87e08c63-969d-4c06-9537-7d966ac07d8f)Describe any introduced user-facing changes: N/A fixing broken behavior
Describe any introduced API changes: !! Breaking changes to the destination's API !!
FieldValuePair
no longer containslabel
andisFavorite
these were moved toFieldSearchResult
to separate the twoDestination.displayInfo
return type changed fromDestinationDisplayInfo
to a union ofDestinationDisplayInfo
andDestinationDisplayInfoError
-- rather than failing the entire query with a global error, errors are now returned inlinedestinationFieldSearch
return type changed toFieldSearchConnection
, which was renamed fromFieldValueConnection
to matchFieldSearchResult
Additional Info: The affected APIs are only used when the
dest-types
experimental flag is enabled.