Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emilebosch/graphql-metrics
GraphQL metrics dashboard for ruby GraphQL :zap:
https://github.com/emilebosch/graphql-metrics
graphql graphql-metrics rails ruby
Last synced: 3 months ago
JSON representation
GraphQL metrics dashboard for ruby GraphQL :zap:
- Host: GitHub
- URL: https://github.com/emilebosch/graphql-metrics
- Owner: emilebosch
- Created: 2017-08-25T09:00:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T07:25:17.000Z (almost 2 years ago)
- Last Synced: 2024-06-03T18:59:36.420Z (5 months ago)
- Topics: graphql, graphql-metrics, rails, ruby
- Language: Ruby
- Homepage: https://emile.wtf
- Size: 379 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Graphql Metrics Dashboard
A picture is more worth than a thousand badly written words.
![alt text](https://raw.githubusercontent.com/emilebosch/graphql-metrics/master/metric.png)
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:
```ruby
gem 'graphql_metrics',source: 'https://github.com/emilebosch/graphql-metrics.git'
```Add to your graphql schema:
```ruby
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`
```ruby
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.