Update Branch rules approval rules to use the data from GraphQL
Summary
In !147890 (merged) we updated the Branch rules details page to use the shared approval rules app.
The approval rules app uses a separate endpoint to retrieve the list of approval rules (<project>/approval_rules
REST API). We can optimise the implementation of the approval rules app on the Branch rules details page by including the approval rules in the Branch rules GraphQL request, this way we don't have to make the separate REST API call to get the list of approval rules.
ApprovalProjectRule
already exists for the GraphQL request, but it does not contain all the fields needed for the Approval rules app to work.
As part of this issue we need to:
- Identify the missing fields in
ApprovalProjectRule
(frontend). - Add the missing fields to the
ApprovalProjectRule
type (backend). - Update the GraphQL schema on the frontend to include the new fields (frontend).
- Update the approval rules app to accept data from the parent and skip the REST API call (frontend).
Edited by Jacques Erasmus