Homepage
Link to WPGraphQL on Github
Link to WPGraphQL on WordPress.org

graphql_cursor_ordering_field

Filters the field used for ordering connection queries when cursors are used for pagination

Params

  • $field (array): The field used for ordering the cursor.
    • $key (string): The field key
    • $value (string): The field value
    • $type (string): The type the field should be cast as
    • $order (string): The order the field should be ordered by
  • $cursor_builder (\WPGraphQL\Data\Cursor\CursorBuilder): The instance of the CursorBuilder class, passed to the filter for context
  • $object_cursor (\WPGraphQL\Data\Cursor\PostObjectCursor): The instance of the PostObjectCursor class, passed to the filter for context