By tstoeckler on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.4.x
Introduced in version:
11.4.0
Issue links:
Description:
If a computed field value is returned via JSON:API, the computed field item list class can now implement Drupal\Core\Cache\CacheableDependencyInterface in order to have its cacheability metadata bubble to the response.
This was already fixed for rendered output in 10.2.4 (see https://www.drupal.org/node/3423720) and is now fixed for JSON:API.
As is noted in the other change notice, note that theoretically the added logic applies to the field item list classes of non-computed fields, as well, but it generally does not make sense to apply cacheable metadata to non-computed fields.
Impacts:
Module developers