Find important nodes and edges with their edge connection count in cytoscape.js

I am using a cytoscape.js chart for showing data with nodes and edges. I know the cytoscape.js chart may encounter some performance issues while rendering a large number of data (like people collaboration chart). I am looking for any inbuilt function available to find the important nodes with their edges in the chart canvas and remove the other nodes and their relation. I think the cytoscape.js library doesn’t provide any straightforward method to achieve this.
Any help is much appreciated.