Views Execute
views_executeExecute a Drupal view through the Views API and return its rows; pass display, contextual filters, exposed filters, limit, and offset to target results.
Instructions
Execute a view and return its rows.
Runs the view through the Views API rather than guessing at a GraphQL
schema. The graphql module ships no view(view_id:...) root field, so
the query this used to send could never resolve, and the fallback asked
JSON:API for views/{id}/{display}, which is not a resource either.
Neither path was reachable, so the tool failed wherever Views was
installed and healthy.
args are the view's contextual filters, in order. filters are set
on the view's exposed input, which is what a visitor filling in the
view's own filter form sets. A display that does not exist is reported
along with the displays the view does have: ViewExecutable::setDisplay
would otherwise fail later, with a message naming neither the view nor
the display the caller asked for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| limit | No | ||
| offset | No | ||
| filters | No | ||
| view_id | Yes | ||
| display_id | No | default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||