2017 © Pedro Peláez
 

wordpress-plugin wp-graphql-insights

Insights for WPGraphQL. Performance and error logging.

image

wp-graphql/wp-graphql-insights

Insights for WPGraphQL. Performance and error logging.

  • Friday, June 8, 2018
  • by jasonbahl
  • Repository
  • 4 Watchers
  • 9 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 4 Open issues
  • 9 Versions
  • 143 % Grown

The README.md

Deprecated

The features of this plugin have been merged into WPGraphQL core., (*1)

See: https://github.com/wp-graphql/wp-graphql/releases/tag/v0.13.0, (*2)


Logo, (*3)

WPGraphQL Insights

Build Status Coverage Status, (*4)

This adds tracing to WPGraphQL, per the proposed Apollo Tracing Spec: https://github.com/apollographql/apollo-tracing., (*5)

Demo GIF showing usage in GraphiQL, (*6)

Install / Activate the Plugin

To install/activate the plugin, download from Github, unzip, and place in your plugins directory as wp-graphql-insights then activate like any other plugin., (*7)

There is no admin screen, the plugin will automatically add tracing to your GraphQL (v0.0.18+) requests., (*8)

Use Trace data on the server, exclude it from the GraphQL response

You might want to have Tracing enabled on the server to allow for tools to make use of that data, but you might not want to include tracing in the response., (*9)

Here's an example of disabling the trace from the response of the GraphQL Request (so the consumer won't see it), but making use of the trace data on the server, in this case saving the trace to an options table. But you could do anything like send the trace to a remote service, or schedule a Cron to do something with it., (*10)

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

Using with Apollo Optics

Currently, there is no built-in solution for sending data to Apollo Optics, but there has been discussion regarding potential solutions for getting WPGraphQL Insights trace data over to Optics, so hopefully there will be official Apollo Optics support soon!, (*11)

The Versions

08/06 2018

dev-master

9999999-dev

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPL-3.0+

by Jason Bahl

07/04 2018

dev-feature/add-access-control-headers

dev-feature/add-access-control-headers

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

18/03 2018

0.2.0

0.2.0.0

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

05/02 2018

dev-feature/query-batch-support

dev-feature/query-batch-support

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

03/11 2017

dev-feature/update-to-0.0.2

dev-feature/update-to-0.0.2

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

17/10 2017

dev-feature/#5-query-logging

dev-feature/#5-query-logging

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

26/09 2017

dev-feature/unit-test-setup

dev-feature/unit-test-setup

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

18/09 2017

dev-feature/change-from-optics-to-insights

dev-feature/change-from-optics-to-insights

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl

16/09 2017

dev-feature/remove-setup

dev-feature/remove-setup

Insights for WPGraphQL. Performance and error logging.

  Sources   Download

GPLv3

by Jason Bahl