Several document-service API suites only need a minimal article schema and
fixtures but were loading the full shared resource pack, making setup and
teardown slow enough to flake on CI hook timeouts.
* Use query builder init in deleteMany
* test(api): deleteMany respects filters combined with relation
* fix(database): pick filter params in deleteMany init
Apply _q, where, and filters through init like count instead of where-only
or full findMany params, avoiding populate/pagination surprises. Expand API
and unit tests for relation filters, count parity, and ignored param keys.
* chore(database): clarify deleteMany relation cleanup TODO
Replace the vague bulk-query TODO with a concrete note that deleteMany
still skips per-row deleteRelations unlike single delete().
---------
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
* fix(homepage): homepage count-documents slow on large D&P tables
* chore: add api test
* test(homepage): add i18n count-documents document_id semantics tests
Assert per-document_id buckets for never-published multi-locale drafts,
partial locale publish states, and mutually exclusive published vs modified.
---------
Co-authored-by: Ben Irvin <ben@innerdvations.com>
* Filter for published results when requesting localizations
* fix(graphql): inherit publication state for i18n localizations
---------
Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
* fix: content release with self-relation parent & child fails with FK violation
1. Concurrent publishes within a content type race on shared join-table state.
2. Errors from scheduled publishes were also silently swallowed leaving
no trail in the logs.
* test: api test for self-related releases
---------
Co-authored-by: Ben Irvin <ben@innerdvations.com>
* fix(document-service): preserve self-referential relations during publish/discard
* test(document-service): convert self-referential API test to TypeScript
* fix(document-service): use JoinTable type and tighten Record types in self-referential-relations
* test(document-service): remove weak load() happy-path unit test
* fix(document-service): skip mappedBy attrs, deduplicate and idempotent-insert self-refs
* test(document-service): fix missing dialect and trx mocks in self-referential-relations tests
* fix(tests): use count assertions for CM API self-referential relation tests
* fix(core): add firstPublishedAt field to draft
* test: add unit test firstPublishedAt
---------
Co-authored-by: Ziyi <daydreamnation@live.com>
Co-authored-by: Alex Birkner <github@tyrola.dev>
* feat: 'toPermissions' in stage management
* test: enhance stage tests
* test: add api tests for to stage permissions
* feat: migration for backward compatible stage transfer permissions
* chore: rename permissions to fromPermissions in workflow stages
* chore: improve type definitions
* chore: rename permissions to fromPermissions
* fix(core): relation handling preserves order during unpublish/republish cycles
* fix: preserve bidirectional order (#25792)
- Keep join rows when related side is still draft; map to published id when available
- Sync owner-side join order when publishing the owning type (inversedBy path)
- Refactor bidirectional load into shared capture + draft→published mapping helpers
Co-authored-by: Ben Irvin <ben@innerdvations.com>
* chore(core): re add order fix
* chore(core): improve structure and batch processing
---------
Co-authored-by: Ben Irvin <ben@innerdvations.com>
* fix: contains filter no longer returns empty data
* chore: fix comments
* fix(utils): stop recursing opaque operator operands in filter traversal
* fix(utils): keep Date and other operand objects when stripping empty filters
* fix: add params actually works
* fix: rename addInputParams
* test: fix register timing
* chore: update getstarted
* test(api): remove ai comment
* revert: do not merge in type unneccessarily
* revert: do not add type to route
* feat(): add hasPublishedVersion parameter for REST API
* fix(): add tests and small fixes
* fix(): fix documentID being overwritten and add tests
* fix(): add filter function so it works for both root and nested queries
* feat(): add parameter for graphQL and tests
* fix(): only add agrs to schema when draft and published is enabled
* test(api): graphql and findfirst tests
* Update packages/core/utils/src/convert-query-params.ts
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
* fix(): fix graphql nested relation issues, add tests
---------
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>