GraphQL metrics dashboard for ruby GraphQL ⚡️
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
lib
.gitignore
Gemfile
Gemfile.lock
README.md
graphql_metrics.gemspec
metric.png

README.md

Graphql Metrics Dashboard

A picture is more worth than a thousand badly written words.

alt text

Simple performance dashboard for graphql queries for runtime development for rails applications. Only use for performance measurement in development, dont run this in production.

Installation

Add to bundle:

gem 'graphql_metrics',source: 'https://github.com/emilebosch/graphql-metrics.git'

Add to your graphql schema:

Schema = GraphQL::Schema.define do
  query(Types::Query)
  mutation(Types::Mutation)
  
  instrument :field, GraphqlMetrics::FieldInstrumentation.new
  instrument :query, GraphqlMetrics::QueryInstrumentation.new
end

Then mount your engine at /metrics

mount GraphqlMetrics::Engine, at: '/metrics'

Note

THis is using an in memory story to record the queries and fields. Therefore you might want to prevent any forking webserver.

Recommend switching to webrick for testing.