Graphql Metrics Dashboard
A picture is more worth than a thousand badly written words.
Simple performance dashboard for graphql queries for runtime development for rails applications. Only use for performance measurement in development, dont run this in production.
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
mount GraphqlMetrics::Engine, at: '/metrics'
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.