When I change the order of custom post types using Post Types Order plugin the new order shows up in the WP GraphQL plugin.
When the reordering is finished I hook into the action provided by the plugin and run the following code
$action_monitor = new \WPGatsby\ActionMonitor\ActionMonitor();
$this->monitor = new \WPGatsby\ActionMonitor\Monitors\PostTypeMonitor($action_monitor);
$this->monitor->trigger_refetch_all (
[
'title' => __( 'Post Type Reordered', 'WPGatsby' ),
]
);
This performs a data update on gatsby cloud but the new order of the post type is not updated during the build. The only way I can apply the correct order is to trigger a manual build and clearing the cache.
When I change the order of custom post types using Post Types Order plugin the new order shows up in the WP GraphQL plugin.
When the reordering is finished I hook into the action provided by the plugin and run the following code $action_monitor = new \WPGatsby\ActionMonitor\ActionMonitor(); $this->monitor = new \WPGatsby\ActionMonitor\Monitors\PostTypeMonitor($action_monitor); $this->monitor->trigger_refetch_all ( [ 'title' => __( 'Post Type Reordered', 'WPGatsby' ), ] );
This performs a data update on gatsby cloud but the new order of the post type is not updated during the build. The only way I can apply the correct order is to trigger a manual build and clearing the cache.
Does anyone know what am I doing wrong here?