New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: deprecate entity-service and delegate to document service #19728
Conversation
3a67086
to
2463a34
Compare
2463a34
to
5ffb3c7
Compare
...query, | ||
where: { id: entityId }, | ||
}); | ||
const entityToDelete = await db.query(uid).findOne({ where: { id: entityId } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor thing, should we support deleting components? Or things that are not content types (media for example, which will be in the future but not now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is handled in the strapi.documents().delete already 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant directly using the component uid to delete it (same as for create and update).
It is just a random thought to provide more v4 compatibilty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok will do another PR to add more compat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some minor comments for improvements, LGTM!
What does it do?
removes as much as possible calls to entityService in internal code where it shouldn't be used
Why is it needed?
To deprecate it correctly.
How to test it?
Provide information about the environment and the path to verify the behaviour.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request