graphql 2.4.15 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/graphql/dashboard/detailed_traces.rb +47 -0
- data/lib/graphql/dashboard/installable.rb +22 -0
- data/lib/graphql/dashboard/limiters.rb +93 -0
- data/lib/graphql/dashboard/operation_store.rb +199 -0
- data/lib/graphql/dashboard/statics/charts.min.css +1 -0
- data/lib/graphql/dashboard/statics/dashboard.css +27 -0
- data/lib/graphql/dashboard/statics/dashboard.js +74 -9
- data/lib/graphql/dashboard/subscriptions.rb +96 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/detailed_traces/traces/index.html.erb +45 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/limiters/limiters/show.html.erb +62 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/not_installed.html.erb +18 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/clients/_form.html.erb +23 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/clients/edit.html.erb +21 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/clients/index.html.erb +69 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/clients/new.html.erb +7 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/index_entries/index.html.erb +39 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/index_entries/show.html.erb +32 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/operations/index.html.erb +81 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/operation_store/operations/show.html.erb +71 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/subscriptions/subscriptions/show.html.erb +41 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/subscriptions/topics/index.html.erb +55 -0
- data/lib/graphql/dashboard/views/graphql/dashboard/subscriptions/topics/show.html.erb +40 -0
- data/lib/graphql/dashboard/views/layouts/graphql/dashboard/application.html.erb +49 -1
- data/lib/graphql/dashboard.rb +45 -29
- data/lib/graphql/execution/interpreter.rb +3 -5
- data/lib/graphql/execution/multiplex.rb +1 -1
- data/lib/graphql/language/parser.rb +13 -6
- data/lib/graphql/query.rb +2 -4
- data/lib/graphql/static_validation/all_rules.rb +1 -1
- data/lib/graphql/static_validation/rules/not_single_subscription_error.rb +25 -0
- data/lib/graphql/static_validation/rules/subscription_root_exists_and_single_subscription_selection.rb +26 -0
- data/lib/graphql/tracing/active_support_notifications_trace.rb +7 -0
- data/lib/graphql/tracing/appoptics_tracing.rb +5 -0
- data/lib/graphql/tracing/appsignal_trace.rb +26 -61
- data/lib/graphql/tracing/data_dog_trace.rb +41 -164
- data/lib/graphql/tracing/monitor_trace.rb +285 -0
- data/lib/graphql/tracing/new_relic_trace.rb +34 -166
- data/lib/graphql/tracing/notifications_trace.rb +181 -37
- data/lib/graphql/tracing/perfetto_trace.rb +15 -18
- data/lib/graphql/tracing/prometheus_trace.rb +47 -74
- data/lib/graphql/tracing/scout_trace.rb +25 -59
- data/lib/graphql/tracing/sentry_trace.rb +57 -99
- data/lib/graphql/tracing/statsd_trace.rb +24 -47
- data/lib/graphql/tracing/trace.rb +0 -17
- data/lib/graphql/tracing.rb +1 -0
- data/lib/graphql/version.rb +1 -1
- metadata +25 -4
- data/lib/graphql/dashboard/views/graphql/dashboard/traces/index.html.erb +0 -63
- data/lib/graphql/static_validation/rules/subscription_root_exists.rb +0 -17
@@ -1,63 +0,0 @@
|
|
1
|
-
<% content_for(:title, "Profiles") %>
|
2
|
-
<div class="row">
|
3
|
-
<div class="col">
|
4
|
-
<h1>Detailed Profiles</h1>
|
5
|
-
</div>
|
6
|
-
</div>
|
7
|
-
<% if !@detailed_trace_installed %>
|
8
|
-
<div class="row">
|
9
|
-
<div class="col-md col-lg-6 mx-auto">
|
10
|
-
<div class="card mt-4">
|
11
|
-
<div class="card-body">
|
12
|
-
<div class="card-title">
|
13
|
-
<h3>
|
14
|
-
Traces aren't installed yet
|
15
|
-
</h3>
|
16
|
-
</div>
|
17
|
-
<p class="card-text">
|
18
|
-
GraphQL-Ruby can instrument production traffic and save tracing artifacts here for later review.
|
19
|
-
</p>
|
20
|
-
<p class="card-text">
|
21
|
-
Read more in <%= link_to "the tracing docs", "https://graphql-ruby.org/queries/tracing#detailed-traces" %>.
|
22
|
-
</p>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<% else %>
|
28
|
-
<div class="row">
|
29
|
-
<div class="col">
|
30
|
-
<table class="table table-striped">
|
31
|
-
<thead>
|
32
|
-
<tr>
|
33
|
-
<th>Operation</th>
|
34
|
-
<th>Duration (ms) </th>
|
35
|
-
<th>Timestamp</th>
|
36
|
-
<th>Open in Perfetto UI</th>
|
37
|
-
</tr>
|
38
|
-
</thead>
|
39
|
-
<tbody>
|
40
|
-
<% if @traces.empty? %>
|
41
|
-
<tr>
|
42
|
-
<td colspan="4" class="text-center">
|
43
|
-
<em>No traces saved yet. Read about saving traces <%= link_to "in the docs", "https://graphql-ruby.org/queries/tracing#detailed-profiles" %>.</em>
|
44
|
-
</td>
|
45
|
-
</tr>
|
46
|
-
<% end %>
|
47
|
-
<% @traces.each do |trace| %>
|
48
|
-
<tr>
|
49
|
-
<td><%= trace.operation_name %></td>
|
50
|
-
<td><%= trace.duration_ms.round(2) %></td>
|
51
|
-
<td><%= Time.at(trace.begin_ms / 1000.0).strftime("%Y-%m-%d %H:%M:%S.%L") %></td>
|
52
|
-
<td><%= link_to "View ↗", "#", data: { perfetto_open: trace.operation_name, perfetto_path: "#{graphql_dashboard.traces_path}/#{trace.id}" } %></td>
|
53
|
-
<td><%= link_to "Delete", "#", data: { perfetto_delete: "#{graphql_dashboard.traces_path}/#{trace.id}" }, class: "text-danger" %></td>
|
54
|
-
</tr>
|
55
|
-
<% end %>
|
56
|
-
</tbody>
|
57
|
-
</table>
|
58
|
-
<% if @last && @traces.size >= @last %>
|
59
|
-
<%= link_to("Previous >", graphql_dashboard.traces_path(last: @last, before: @traces.last.begin_ms), class: "btn btn-outline-primary") %>
|
60
|
-
<% end %>
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
<% end %>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module GraphQL
|
3
|
-
module StaticValidation
|
4
|
-
module SubscriptionRootExists
|
5
|
-
def on_operation_definition(node, _parent)
|
6
|
-
if node.operation_type == "subscription" && context.types.subscription_root.nil?
|
7
|
-
add_error(GraphQL::StaticValidation::SubscriptionRootExistsError.new(
|
8
|
-
'Schema is not configured for subscriptions',
|
9
|
-
nodes: node
|
10
|
-
))
|
11
|
-
else
|
12
|
-
super
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|