The module contains a number of hook to extend and change functionality.

I think it is missing a hook to alter queries. Drupal has hooks such as hook_entity_query_alter() but those are very broad and it's not easy to determine that you are altering a restws specific query.

I would like to propose:
hook_restws_query_alter(&$query, $entity_type, $meta_controls)

CommentFileSizeAuthor
#2 hook-restws-query-alter-2547611-2.patch581 bytesJoeMcGuire

Comments

JoeMcGuire created an issue. See original summary.

JoeMcGuire’s picture

Status: Active » Needs review
StatusFileSize
new581 bytes

Attached patch which implements hook_restws_query_alter() as defined. The alter is applied after the query has built but before the access check.

Status: Needs review » Needs work

The last submitted patch, 2: hook-restws-query-alter-2547611-2.patch, failed testing.