Repository navigation
Proposal: DX Debug Component for Pega React Apps #206
gurbinder-big
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We propose creating a DX component similar to Postman for Pega React applications. This component will allow developers to test Pega Core methods, data pages, and other Pega configurations directly from the Pega Inside, providing real-time results and helping reduce context switching between App Studio and React development.
Problem Statement:
Currently, when a Pega Architect configures a Data Page or other Pega artifacts:
Proposed Solution:
Develop a Debug DX Component that can be added to App Studio.
Key features:
Example
For instance, let’s take an example of getDataPage.
In the documentation for the method getDataPage Here, it explains how to provide pagination parameters in the query payload (e.g., pageSize and pageNumber), but it does not show what the response contains. Specifically, important fields like totalCount or a hasMore boolean are missing from the documentation. These fields are critical for frontend developers to implement features like pagination correctly.
// Input payload
{
"pageSize": 10,
"pageNumber": 2
}
// Documented response (incomplete)
{
data: [
{
"Name" : "Mark wood",
"Role" : "Software",
"Gender" : "Male"
},
{
"Name" : "Gabe Edwards",
"Role" : "Software",
"Gender" : "Male"
}
]
fetchDateTime: "2020-06-29T11:06:24.329Z",
pageNumber: 1,
pageSize: 10
}
The official docs do not show hasMore or totalCount, which are necessary to correctly display pagination controls on the frontend. Without seeing the full response, frontend developers either have to experiment or rely on backend/Pega developers to verify the data.
In my experience, I had to go through multiple Pega developers before figuring out how to get the totalCount using the DX API, including the exact input parameters required. This process was time-consuming and error-prone.
A Debug DX Component would solve this by allowing developers to test methods like getDataPage directly in Pega Inside, see the full response including fields like hasMore and totalCount, and export configurations for frontend use—eliminating guesswork and repeated back-and-forths.
All reactions