Add openPorts field definition and resolver to Workspace GraphQL type
MR: Pending
Description
As part of our new designs for Workspaces, we want the frontend to display all currently open ports in expanded workspace cards (including dynamically opened ports). To achieve this, we need to add an openPorts
field to the existing workspace GraphQL type and implement its resolver.
Acceptance criteria
-
Add openPorts
field definition to existing workspace GraphQL type -
Implement resolver method that returns all currently open ports in the workspace -
Include port numbers and associated URLs for each open port -
Return both devfile-defined ports and dynamically opened ports -
Handle cases where port information is unavailable gracefully -
Update GraphQL field documentation with examples
TODO: Implementation plan
Current Implementation: Initially we may extract available port information from workspace.processed_devfile
until enhanced workspace communication is implemented.
Refer to Show workspace ports in VS Code Panel (&15732) • Daniyal Arshad for investigating how to get workspace ports information in Rails monolith.
Edited by Sahil Sharma