Skip to content

fix(contracts): equality-only ObjectId filter inputs#81

Open
ahmetcantiryaki wants to merge 2 commits into
mainfrom
fix/graphql-objectid-contracts
Open

fix(contracts): equality-only ObjectId filter inputs#81
ahmetcantiryaki wants to merge 2 commits into
mainfrom
fix/graphql-objectid-contracts

Conversation

@ahmetcantiryaki

@ahmetcantiryaki ahmetcantiryaki commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Özet

core#1178'in contract yansıması: ObjectId-backed id alanları GraphQL şemasında artık yalnızca eşitlik operatörleri sunuyor (substring operatörleri ObjectId _id'de mongot 500'üne yol açıyordu — trace 0f4f89b172bb58dd002bde2fbc6f890d).

Değişiklikler

  • common.ts: yeni ObjectIdOperationFilterInput (eq/neq/in/nin).
  • id filter alanları StringOperationFilterInputObjectIdOperationFilterInput: proposals, cases, policies, policyTransfers, filePolicyTransfers, webhookDeliveries (id + webhookId) — core'daki [StoredAsObjectId] alan kümesiyle birebir. Customer id Guid (Uuid input) olduğundan kapsam dışı.
  • generate-meta.ts: ObjectIdOperationFilterInput → yeni objectId kind eşlemesi; id alanlarının meta'sı artık filterOperators: ['eq','neq','in','nin'] üretiyor.

Test Plan

  • packages/contracts: typecheck / build / test — temiz (88/88), rebase sonrası yeniden koşuldu.
  • Meta regen (generate-meta) — "Generated meta for 9 interfaces".
  • prettier — dokunulan dosyalar temiz.

Not

core#1178 ile birlikte değerlendirilmeli; panel tarafı (agent-panel#81) id filtresini zaten client-side eq/neq + 24-hex validasyonuna kilitledi, bu contract değişikliği o davranışı tip seviyesinde de garanti altına alıyor.

🤖 Generated with Claude Code

ahmetcantiryaki and others added 2 commits July 10, 2026 15:19
WebhookEvent değerlerini SCREAMING_SNAKE'ten backend'in kanonik
lowercase-dotted tanımlayıcılarına döndürür (örn. 'policy.created',
'customer.kvkk_consent_given') — backend REST sözleşmesi, delivery
payload'ı ($event) ve docs.insurup.com ile birebir aynı.

0.1.40'taki SCREAMING_SNAKE değerleri (sibling enum desenine bakılarak
yapılan) yanlış varsayımdı; webhook event'leri kanonik olarak lowercase-
dotted. Backend createWebhook bu değerleri kabul etmiyordu (400). Enum
üye adları değişmedi; yalnızca wire değerleri.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…odegen

- New ObjectIdOperationFilterInput (eq/neq/in/nin); id (and
  webhookId) filter fields switched from StringOperationFilterInput
  across proposals, cases, policies, policyTransfers,
  filePolicyTransfers and webhookDeliveries - mirrors the core schema
  change that stops exposing substring operators on ObjectId-backed
  ids (they made mongot 500)
- generate-meta: map ObjectIdOperationFilterInput to a new objectId
  kind; normalize backslashes so the ts-morph glob and primaryDir
  comparison work on Windows (codegen previously found 0 interfaces
  and emitted an empty registry)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant