Skip to content
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

Merged
merged 1 commit into from Mar 13, 2024

Conversation

alexandrebodin
Copy link
Member

@alexandrebodin alexandrebodin commented Mar 11, 2024

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

@alexandrebodin alexandrebodin force-pushed the v5/entity-service branch 16 times, most recently from 3a67086 to 2463a34 Compare March 12, 2024 19:45
@alexandrebodin alexandrebodin added pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: core:core Source is core/core labels Mar 12, 2024
@alexandrebodin alexandrebodin self-assigned this Mar 12, 2024
@alexandrebodin alexandrebodin added this to the 5.0.0 milestone Mar 12, 2024
@alexandrebodin alexandrebodin marked this pull request as ready for review March 12, 2024 20:23
...query,
where: { id: entityId },
});
const entityToDelete = await db.query(uid).findOne({ where: { id: entityId } });
Copy link
Contributor

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).

Copy link
Member Author

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 🤔

Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

@Marc-Roig Marc-Roig left a 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!

@alexandrebodin alexandrebodin merged commit ec8a0ec into v5/main Mar 13, 2024
102 checks passed
@alexandrebodin alexandrebodin deleted the v5/entity-service branch March 13, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: chore This PR contains chore tasks (cleanups, configs, tooling...) source: core:core Source is core/core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants