Files
tilbudgivern/apitest/BATCH_13_PLAN.md
T

3.9 KiB

Batch 13 Plan - Medium Mutations (Update Operations - Part 1)

Strategy: Update Operations

Batch 13 continues the mutation phase with 30 update operations - mutations that modify existing data but don't create or delete records.

Total Update Mutations: 78 (from analysis)

Risk Level: 🟡 MEDIUM

  • Modify existing records
  • Don't create new data
  • Don't delete data
  • Can be partially tested with valid IDs
  • May affect production state

Batch 13 Focus: First 30 Update Mutations

Endpoints (30 total)

Account/Finance (2)

  1. updateAccount - Update account information
  2. updateFinanceAgreement - Update finance agreement

Appendix (3)

  1. updateAppendix - Update appendix
  2. updateAppendixLine - Update appendix line
  3. updateAppendixLines - Update multiple appendix lines (bulk)

Case Management (5)

  1. updateCase - Update case information
  2. updateCaseConfirmationDraftLine - Update case confirmation draft line
  3. updateCaseMaterial - Update case material
  4. updateCaseStatus - Update case status
  5. updateCaseTemplate - Update case template
  6. updateCaseType - Update case type

Contact/Customer (5)

  1. updateContactPerson - Update contact person
  2. updateCustomer - Update customer information
  3. updateCustomerCategory - Update customer category
  4. updateCustomerDocument - Update customer document
  5. updateCustomerEmployeeType - Update customer employee type

Creditor/Invoice (3)

  1. updateCreditor - Update creditor
  2. updateCreditorInvoice - Update creditor invoice
  3. updateCreditorInvoiceInboundLine - Update creditor invoice inbound line
  4. updateCreditorInvoiceInboundLines - Update multiple creditor invoice lines (bulk)

User/Department (2)

  1. updateCurrentUser - Update current logged-in user
  2. updateDepartment - Update department

Delivery/Discount (3)

  1. updateDeliveryAddress - Update delivery address
  2. updateDiscountGroup - Update discount group
  3. updateDiscountGroupInterval - Update discount group interval

Documentation (4)

  1. updateDocumentationFile - Update documentation file
  2. updateDocumentationFileComment - Update file comment
  3. updateDocumentationFolder - Update documentation folder
  4. updateDocumentationFolderShare - Update folder sharing

Event (1)

  1. updateEvent - Update event

Testing Strategy

For each mutation:

  1. Introspect arguments - Get required parameters and input types
  2. Create documented script - With parameter validation
  3. Add safety warnings - Document what gets modified
  4. Mark as placeholder - Most can't be safely tested in production
  5. Note testable candidates - E.g., updateCurrentUser might be safe

Expected Pattern:

Most update mutations follow this pattern:

mutation UpdateX($id: Int!, $input: XInput!) {
  updateX(id: $id, input: $input) {
    id
    ...fields
  }
}

Testability Assessment:

  • ✅ Possibly testable: updateCurrentUser (only affects test user)
  • ⚠️ Requires IDs: All others need valid production IDs
  • 🔴 Production impact: Most modify real business data

Success Criteria

  • ✅ All 30 scripts created with documentation
  • ✅ Clear parameter requirements documented
  • ✅ Safety warnings included
  • ✅ Testable mutations identified
  • ✅ Update progress: 279 → 309/507 (61%)

Implementation Approach

Given the large number of mutations and their complexity:

  1. Create placeholder scripts with consistent structure
  2. Document required parameters from introspection
  3. Add safety warnings based on mutation purpose
  4. Mark few as testable (like updateCurrentUser)
  5. Provide implementation notes for future development

Next Batches

  • Batch 14: 30 more update mutations
  • Batch 15: Remaining update mutations (~18)
  • Batch 16-22: Create/delete mutations (dangerous)

Batch 13 Goal: Document all basic update operations and establish update mutation patterns.