wso2 / product-apim

Welcome to the WSO2 API Manager source code! For info on working with the WSO2 API Manager repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
838 stars 783 forks source link

View GraphQL query analysis values in devportal tryout #12490

Open rmsamitha opened 2 years ago

rmsamitha commented 2 years ago

Describe your problem(s)

In the "Complexity Analysis" tab in GraphQL try-out page in devportal, we can see only the complexity Values of each field. If we want to know the complexity value or the depth value, we have to calculate ourself manually. Instead, it would be a nice to have feature to have the possibility to display the calculated complexity/depth values on a button click. So before executing the queries, user would know the complexity/depth value of them.

Another important concern is that eventhough we have named this tab as "Complexity Analysis", there is no analysis doable via that tab. It only displays the complexity values ATM. So the current implementation of the tab is not doing what it says as doing. If we add a capability as $subject this tab name "Complexity Analysis" would be meaningful.

Describe your solution

Should be possible to re-use/adapt the implementation of GraphQLQueryAnalysisHandler to implement this improvement.

rmsamitha commented 2 years ago

@bhathiya @tgtshanika @HiranyaKavishani @tharindu1st WDYT on this feasibility of this requirement? We can implement this in a next release after 4.1.0 if feasible.