BE: Add mutation APIs for workspace ports
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
MR: Pending
Description
As a pre-requisite to enable management of ports through a VSCode extension from within a workspace we want to introduce the following mutations:
- Mutation for creating a new
workspace_portsrecord - Mutation for removing an existing record
Acceptance Criteria
-
Add new create/remove APIs for workspace ports -
Add a new field in the WorkspaceCreate mutation to return workspace ports -
New mutations mounted in ee/app/graphql/ee/types/mutation_type.rb -
Add remote development domain logic modules to handle mutation requests -
Add new policy for workspace ports to allow create/delete with workspace level authorization rules -
GraphQL docs updated -
Add unit tests for each new class -
Update remote_development integration_spec.rbto test the new mutations
Technical Requirement
GraphQL changes
-
Mutation.workspaceCreatename type field workspacePorts[WorkspacePort!] -
Mutation.workspaceAddPort:name type argument portNumberIntargument workspaceIdGlobalIDType[::RemoteDevelopment::Workspace]field workspacePortWorkspacePortAll ports added with this mutation should have
port_typeset asuser_defined -
Mutation.workspaceRemovePort:name type argument portNumberIntargument workspaceIdGlobalIDType[::RemoteDevelopment::Workspace]Only
user_definedports should be removed with this mutation
Authorization Policy
- Policy should have workspace level authorization rules
Edited by 🤖 GitLab Bot 🤖