Skip to content

Create new request lifecycles in addition to the current query lifecycles #8193

@derrickmehaffy

Description

@derrickmehaffy
  • I have created my request on the Product Board before I submitted this issue
  • I have looked at all the other requests on the Product Board before I submitted this issue

Please describe your feature request:

Based on https://github.com/strapi/strapi/discussions/6871#discussioncomment-90811

Creating a feature request for this, we should be passing the ctx into the model lifecycles for various reasons. Off the top of my head I could see some usage in say beforeX to compare new data to old data (maybe some kind of version history or audit log or something).

Yes this could be done via a custom controller but it's far easier to build a model lifecycle in most users cases.


Edited based on #8193 (comment)

A rough breakdown per my convo with @alexandrebodin will be something like this (a small part of the new request layer we are planning)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions