PHP code example of wp-graphql / wp-graphql-insights

1. Go to this page and download the library: Download wp-graphql/wp-graphql-insights library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wp-graphql / wp-graphql-insights example snippets


add_filter( 'graphql_tracing_', function() {
	$trace = \WPGraphQL\Extensions\Insights\Tracing::get_trace();
	update_option( 'graphql_trace_yo', $trace );
}, 100 );