Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add the possibility to filter fields in the channel generated URL.
Add the possibility to filter fields in the channel generated URL.
Comments
Comment #2
Grimreaper3 Approaches possible discussed with @friera, @richardrodriguez21, and others at Werfen.
The first one is using the JSONAPI extras module to alter JSONAPI endpoints to remove the not required fields.
But it has a drawback to alter for all the clients. (blacklist)
The second one is adding settings into the channel, to have parameters on the JSONAPI endpoints, to have only the required fiels in the payload (whitelist).
But for relationship links, thoses parameters are not preserved so you can be in a situation of wanting title of news and related news, but the related news will get all the fields.
We can introduce an event in the import process to alter the related link URL according to the channel parameters. But we are in entity_share_client which does not have access on the channel entity. So it adds work to have this information available.
The third one is to have a config per entity type / per bundle to whitelist the fields we want to import and to add an event during the import to unset the not required fields before entity denormalization.
Comment #3
GrimreaperComment #4
GrimreaperComment #7
Grimreaper