gatsbyjs / wp-gatsby

WordPress plugin for gatsby-source-wordpress
Other
167 stars 41 forks source link

Trigger_Refetch_All not triggering a rebuild of the entire site #190

Open psharma-ii opened 3 years ago

psharma-ii commented 3 years ago

We are running into issue where firing Trigger_Refetch_All is not rebuilding the entire site. According to the PR #74, looks like its supposed work, but its not. I had to manually fire a clean cache and rebuild on gatsby cloud to fetch_all. Here's a code example of how we are using it

$action_monitor = new \WPGatsby\ActionMonitor\ActionMonitor();
        $monitor = new \WPGatsby\ActionMonitor\Monitors\ActionMonitor($action_monitor);

        $monitor->trigger_refetch_all(
            [
                'title' => __( 'Global Settings Changed', 'WPGatsby' ),
            ]
        ); 

which is creating records in the db with the correct time stamp


{"action_type":"REFETCH_ALL","title":"Global Settings Changed","node_id":"refetch_all","relay_id":"refetch_all","graphql_single_name":"refetch_all","graphql_plural_name":"refetch_all","status":"refetch_all"}