Other

Editor-defined relation order should be retrievable through REST and GraphQL APIs
## Problem Strapi allows content editors to manually reorder relations using drag-and-drop in the Admin UI. This creates a natural expectation that the order of those relations is meaningful content and can be consumed by applications through the API. However, while Strapi persists and displays the editor-defined order in the Admin UI, there is currently no supported or reliable way to retrieve relations in that same order through REST or GraphQL APIs. As a result: Editors spend time curating and ordering content. Strapi stores and restores that ordering in the Admin UI. Developers cannot reliably retrieve that ordering through the API. This creates a disconnect between the editorial experience and the developer experience. --- ## Why this matters The order of related content is often part of the content itself, not merely a presentation concern. Common examples include: Featured articles Homepage content blocks Product showcases Learning paths Curated collections Navigation structures Related content sections Recommended products or resources In these cases, editors intentionally arrange items in a specific order. When a CMS exposes drag-and-drop ordering, users reasonably expect that ordering to be available to API consumers. --- ## Existing workarounds Current workarounds include: Creating explicit sort fields on related entities Creating wrapper content types Using repeatable components instead of relations Maintaining ordering logic outside the relation itself While these approaches can work, they duplicate functionality already available in the Admin UI and add unnecessary complexity to content modeling. --- ## Why this feels like a product gap The key point is that Strapi already supports editorial ordering: Editors can reorder relations. The order is persisted. The order is restored when editing content later. The information already exists. The missing capability is providing a supported way for developers to retrieve that editor-defined order through the API. This is not a request for a completely new editorial feature. The editorial workflow already exists. --- ## Community history This topic has been raised repeatedly over multiple years and across multiple major versions of Strapi. GitHub issues: #2616 (2019) — Relation order not preserved #6010 (2020) — GraphQL relation ordering concerns #16961 (2023) — Relation ordering inconsistencies in API responses #24212 (2025) — Closed as "will not fix" #25582 (2026) — Similar concerns around relation ordering Forum discussions: https://forum.strapi.io/t/save-relation-items-order-issue-2166/332 The recurrence of this topic suggests a mismatch between user expectations and the current platform behavior. Many users appear to assume that if a relation can be ordered by an editor, that order can also be retrieved by applications. --- ## Requested enhancement Provide a supported way to retrieve relations in the exact order configured by editors. Possible implementations could include: ### Option 1 Return relations in editor-defined order by default. ### Option 2 Expose the stored relation order through a dedicated field. ### Option 3 Provide an explicit query parameter or API option that requests editor-defined ordering. The specific implementation is less important than providing a supported and documented mechanism. --- ## Expected behavior If an editor manually reorders relations in the Admin UI and saves the entry, developers should have a supported way to retrieve those relations in the same order through REST and GraphQL APIs. Editor-defined order is content and should be retrievable.
0
feat(server): built-in Node.js cluster mode — all services share one process, impossible to scale independently
Strapi version: 5.x (latest) Node.js version: 20.x Package manager: yarn 4.12.0 Problem: server/index.ts mounts the admin panel, content API, upload handler, cron jobs, and webhook runner all on one Koa app in one OS process. There is no built-in mechanism to run multiple worker processes (Node.js cluster mode). This means: You can only scale the entire Strapi process — you cannot scale just the Content API under traffic while leaving the admin panel on a single instance. Running multiple instances externally (via pm2 or Kubernetes replicas) causes cron jobs to fire on every instance simultaneously, producing race conditions and duplicate side-effects (duplicate emails, duplicate webhook calls). See also: #15634. The cron service ( cron.ts ) uses node-schedule with no leader- election or instance awareness — every instance runs every cron task. What the code does today: In packages/core/core/src/services/server/index.ts , createServer() builds one Koa app with both createAdminAPI(strapi) and createContentAPI(strapi) on the same process and same port. In packages/core/core/src/services/cron.ts , createCronService() schedules jobs unconditionally with no check for whether this process is the designated primary. Proposed solution (monolith fix, no microservices required): Add opt-in built-in cluster support: A server.cluster.enabled config flag (default: false). When enabled, Strapi's entry point forks N worker processes using Node.js cluster module (default: os.cpus().length ). A STRAPI_INSTANCE_TYPE environment variable ( primary / worker ) lets services guard singleton behaviour: - Cron jobs only run on the primary process. - Webhook runner only runs on the primary process. - Database migrations only run on the primary process. Workers handle all HTTP traffic (load-balanced by the OS). Related issues: #3976 (cluster mode question, closed 2019, no code change made) #15634 (cron race condition, open/stale, no PR merged) I plan to submit a PR implementing this. reproduce: Deploy two Strapi v5 instances pointing to the same database (e.g. two pm2 instances or two Kubernetes pods). Configure a cron task in config/cron-tasks.ts that sends an email or writes a unique log entry. Wait for the cron schedule to fire. Observe: the cron task executes on BOTH instances simultaneously, producing duplicate emails or duplicate log entries. For the scaling limitation: Monitor CPU usage on a single Strapi instance under load. Attempt to scale only the content API (e.g. by running a second instance that only serves /api/* routes). Observe: impossible without running a full second Strapi process, which doubles the cron, webhook, and admin overhead unnecessarily. #Expected behavior When server.cluster.enabled: true is set in config: Strapi should fork N worker processes automatically. Only the primary process should run cron jobs and webhook delivery. All workers should handle HTTP requests, load-balanced by the OS. Database migrations should run once on the primary before workers start. The behaviour should be identical to the current single-process mode when cluster.enabled is false (default), so there is zero breaking change for existing deployments.
0
Feature Request Native Autosave in Content Manager (v5)
I'd like to request native autosave functionality in the Strapi v5 Content Manager, covering both periodic autosave (every X seconds) and save-on-blur (when leaving a field). This is a common UX expectation in modern CMS platforms and its absence is a frequent source of data loss for editors. Problem When working in the Content Manager, there is currently no mechanism that automatically saves a user's progress. If a user accidentally closes the tab, navigates away, or experiences a browser crash, all unsaved work is permanently lost. This is especially painful when editing long-form content or complex entries with many fields. This issue affects: Content editors working on large or long-form entries Teams using Strapi on the Community plan, who have no access to plugin workarounds in some cases Any user on an unstable connection or device Proposed Solution Add a native autosave mechanism to the Content Manager with the following behavior: Periodic Autosave — Automatically save the current entry as a draft every configurable interval (e.g., every 30 seconds), only when changes are detected. Save on Blur — Trigger a save when the user moves focus away from a field. Visual Indicator — Show a subtle status indicator (e.g., "Saving…" / "Saved") in the toolbar so editors know their work is being persisted. Draft-safe — Autosave should save to draft state only, without triggering a publish, to avoid unintended content going live. Proof of Concept (Community Workaround) To validate this is technically feasible within the current architecture, I implemented a custom autosave solution on Strapi v5 using the admin panel extension injection system: Injected a custom React component into the Content Manager via admin/src/app.tsx Used a MutationObserver to detect DOM-level changes in the editor Triggered the Strapi PUT API (/api/{contentType}/{id}) on a debounced interval when changes were detected Displayed a live autosave status badge in the toolbar This worked reliably for both simple and relational fields. The fact that this could be achieved externally confirms that native support at the core level is both feasible and would be significantly more robust. Why This Should Be Native A community workaround via MutationObserver is fragile — it depends on DOM structure that can change between versions It requires each team to re-implement the same logic independently Native autosave would have access to the internal form state directly, making it more reliable, accurate, and maintainable It aligns with UX standards set by other CMS platforms (WordPress, Contentful, Sanity, etc.) Environment Strapi Versionv5 (latest)DeploymentSelf-hosted / CloudPlanCommunity (no plugin access) Additional Context This feature has been discussed informally in the community for some time. Autosave is considered a baseline expectation for content editing tools in 2025. I believe adding it natively — even behind a feature flag or admin toggle — would significantly improve the editor experience for all Strapi users. I'm happy to contribute or provide more details about the PoC implementation if helpful.
0