Group extras

This project is not covered by Drupal’s security advisory policy.

I'm seeking a co-maintainer, if you are interested, contact me through the contact of drupal.org

Group Extras

This is an extension module of group , Back reference gids field on target entity for better decoupled DX

Function

Add gids field on each entity type which been enabled in group. Auto update the above gids filed value when a group content been inserted or deleted.

Background

Get entity's group is easy in drupal system, but not in decoupled system.

Frontend is hard to get it's groups when get an entity.
Filter or sort entity by groups through JSON:API is hard and has performance problem.
To solve decoupled DX, this module back reference a group filed as gids on each entity type which been enabled in group.

How to use ?

Once install the module the gids field will be auto created.

  1. If you enable/disable other group content type after install this module, you can use drush group_extras:build_gids_field_definitions to build/update the gids field.
  2. If the system has some entities before install gids field through this module, you can use drush group_extras:batch_update_gids_value to batch update the gids value.
  3. If you want to completely remove gids field, you can use drush group_extras:delete_gids_field_definitions

Project information

Releases