api: embed preferredContentTypes in the category when requested as subresource#7751
Merged
BacLuc merged 1 commit intoecamp:develfrom Jul 22, 2025
Merged
Conversation
3d2e6d4 to
f505653
Compare
…bresource
This leads currently to requests to
api/content_types?categories=%2Fapi%2Fcategories%2F{id}%2F
which we cannot cache yet.
They are executed when you select a prototype while creating a camp.
We also cannot prefetch all collection urls for the preferredContentTypes.
The request somehow takes a while.
In a camp there are not many categories, and the amount of contentTypes
that would be joined is also limited.
Currently, preferredContentTypes is anyway mostly empty.
Issue: ecamp#6461
f505653 to
b52d843
Compare
BacLuc
added a commit
to BacLuc/ecamp3
that referenced
this pull request
Jul 12, 2025
That we track these now too. Do not yet add the categories subresource, because it is changed right now: ecamp#7751 That we can later improve the performance but know what we changed. Issue: ecamp#6461
BacLuc
added a commit
to BacLuc/ecamp3
that referenced
this pull request
Jul 12, 2025
That we track these now too. Do not yet add the categories subresource, because it is changed right now: ecamp#7751 That we can later improve the performance but know what we changed. Issue: ecamp#6461
carlobeltrame
approved these changes
Jul 22, 2025
| 'read', | ||
| 'Category:PreferredContentTypes', | ||
| ], | ||
| 'swagger_definition_name' => 'read', |
Member
There was a problem hiding this comment.
Is this really needed? We only have it on a collection context in campcollaboration, nowhere else. All other uses of this are in item contexts, and even there I don't remember why we need to deviate from API Platform defaults.
simfeld
approved these changes
Jul 22, 2025
Merged
This was referenced Jul 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This leads currently to requests to
api/content_types?categories=%2Fapi%2Fcategories%2F{id}%2F which we cannot cache yet.
They are executed when you select a prototype while creating a camp. We also cannot prefetch all collection urls for the preferredContentTypes. The request somehow takes a while.
In a camp there are not many categories, and the amount of contentTypes that would be joined is also limited.
Currently, preferredContentTypes is anyway mostly empty.
Issue: #6461