Add the possibility to filter fields in the channel generated URL.

Comments

Grimreaper created an issue. See original summary.

Grimreaper’s picture

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

Grimreaper’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Grimreaper’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev

Grimreaper credited friera.

Grimreaper’s picture