Skip to content

Comments

api: embed preferredContentTypes in the category when requested as subresource#7751

Merged
BacLuc merged 1 commit intoecamp:develfrom
BacLuc:reduce-requests-to-contenttypes-with-filter
Jul 22, 2025
Merged

api: embed preferredContentTypes in the category when requested as subresource#7751
BacLuc merged 1 commit intoecamp:develfrom
BacLuc:reduce-requests-to-contenttypes-with-filter

Conversation

@BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Jul 10, 2025

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

@BacLuc BacLuc requested a review from a team July 10, 2025 07:43
@BacLuc BacLuc force-pushed the reduce-requests-to-contenttypes-with-filter branch from 3d2e6d4 to f505653 Compare July 10, 2025 18:24
…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
@BacLuc BacLuc force-pushed the reduce-requests-to-contenttypes-with-filter branch from f505653 to b52d843 Compare July 12, 2025 12:35
@BacLuc BacLuc added the test-flaky-e2e! Add this label to a PR to run e2e tests multiple times label Jul 12, 2025
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
'read',
'Category:PreferredContentTypes',
],
'swagger_definition_name' => 'read',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@BacLuc BacLuc added this pull request to the merge queue Jul 22, 2025
Merged via the queue into ecamp:devel with commit b2a9b01 Jul 22, 2025
96 of 97 checks passed
@BacLuc BacLuc deleted the reduce-requests-to-contenttypes-with-filter branch July 22, 2025 18:45
@carlobeltrame carlobeltrame mentioned this pull request Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-flaky-e2e! Add this label to a PR to run e2e tests multiple times

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants