Rename the server cron-jobs API to manual automations and remove the deprecated mutations

Aperta
#5,012 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
graphql, typescript

Direzione di ricerca

Start by checking client, MCP server, and scraper-app references to the deprecated GraphQL fields, then review GraphQL Hive usage data and whether accountants still need fetchDeelDocuments. The rename spans packages/server/src/modules/cron-jobs/, packages/server/src/modules-app.ts, packages/server/src/modules/deel/, client code, and eslint.config.mjs; read the schema and resolver files alongside those references. Done means the deprecated mutations and result types are removed or have a dated removal plan, names are updated consistently, and the listed generation, lint, test, and schema checks pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Background

The client screen was renamed from "Cron Jobs" to Manual Automations in #4997, because nothing schedules these jobs: they run only when someone triggers them from the screen. That PR left the server alone on purpose, because renaming the API is a breaking change. Since then, #4999–#5001 added a Deel step to the same mutation and deprecated fetchDeelDocuments.

The server still uses the old names, and several deprecated mutations are still in the schema.

What's left

1. Server naming (packages/server/src/modules/cron-jobs/)

  • Module id cron-jobs, cronJobsModule, CronJobsProvider, run-cron-jobs.helper.ts / runCronJobs, registered in packages/server/src/modules-app.ts.
  • GraphQL names: the runCronJobs mutation, the CronJobsRun type, the CronJobEvent union, and the CronJobStep, CronJobStepState and CronJobStepStatus types, plus the " … cron jobs … " descriptions on the event types.
  • Client code that references the generated names: packages/client/src/hooks/use-run-manual-automations.ts (the RunCronJobs operation) and the files under packages/client/src/components/manual-automations/.
  • The strict-id-in-types exceptions in eslint.config.mjs that list the CronJob* types.

2. Deprecated mutations to remove (each marked @deprecated(reason: "Use runCronJobs"))

  • mergeChargesByTransactionReference, flagForeignFeeTransactions and calculateCreditcardTransactionsDebitDate in cron-jobs/typeDefs/cron-jobs.graphql.ts, and their resolvers and result types: MergeChargesByTransactionReferenceResult, MergeChargesByTransactionReferencePlan, FlagForeignFeeTransactionsResult.
  • fetchDeelDocuments in packages/server/src/modules/deel/typeDefs/deel.graphql.ts and its resolver. It is a thin wrapper around syncDeelDocuments and the only remaining way for an accountant to pull Deel documents (the automations run is owner-only), so check that's acceptable before removing it.

Suggested approach

  • Before removing anything, check that no client relies on the deprecated fields. The in-repo client, MCP server and scraper-app don't call them, but external API users might. GraphQL Hive's schema check / usage data can confirm this.
  • Do the rename in two steps to stay non-breaking: first add the new names next to the old ones and deprecate the old ones (e.g. runManualAutomations, with runCronJobs deprecated), switch the client, and remove the old names in a later release. A single breaking PR is also fine if nothing outside the repo calls the API.
  • Probably two PRs: removing the deprecated mutations, then renaming.

Done when

  • No cron/CronJob names are left in the server module, schema or client code (apart from deprecated aliases kept for compatibility, if any).
  • The four deprecated mutations and their result types are removed, or have a dated plan for removal.
  • yarn generate, yarn lint and yarn test pass, and the Hive schema check passes or its breaking changes are expected.
Lingua principale
TypeScript
Stelle
30
Fork
10
Merge medio
2g 12h
PR unite (30g)
276

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Urigo/accounter-fullstack

Tutte le issue di Urigo/accounter-fullstack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.