Class: LinearToonMcp::Tools::AddProjectToInitiative

Inherits:
Create
  • Object
show all
Defined in:
lib/linear_toon_mcp/tools/add_project_to_initiative.rb

Overview

Link a project to an initiative. Accepts names or UUIDs for both.

Constant Summary collapse

MUTATION =
<<~GRAPHQL
  mutation($input: InitiativeToProjectCreateInput!) {
    initiativeToProjectCreate(input: $input) {
      success
      initiativeToProject {
        id
        initiative { id name }
        project { id name }
      }
    }
  }
GRAPHQL

Instance Method Summary collapse

Methods inherited from Create

entity, entity_label, entity_name, label, mutation, mutation_name, mutation_string, #perform

Methods inherited from Base

call, #call, error_response, #perform, success_response

Instance Method Details

#variables(initiative:, project:) ⇒ Object



41
42
43
44
45
# File 'lib/linear_toon_mcp/tools/add_project_to_initiative.rb', line 41

def variables(initiative:, project:)
  initiative_id = Resolvers::Initiative.call(value: initiative)
  project_id = Resolvers::Project.call(value: project)
  {input: {initiativeId: initiative_id, projectId: project_id}}
end