graphql-metrics 3.0.3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml +1 -8
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +4 -4
- data/graphql_metrics.gemspec +1 -2
- data/lib/graphql/metrics/analyzer.rb +12 -12
- data/lib/graphql/metrics/version.rb +1 -1
- metadata +12 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbb0d2e1dfd6cf0d08b8c47afedddc2025407dd11c482e07df8e8e86ddbba329
|
4
|
+
data.tar.gz: 5dfeeb2067df244cf6fe6d755cc6ff0d8995f423ad791f6617cc3368b2d0ac6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf14bbede098cf4dbc7a6a9e4645d29c084655763a6b0ed7d51415f9b2efd62672f45228f6f0b3488fdfd6e4067ac4167c74e11b9abb8d59002ccf8709412737
|
7
|
+
data.tar.gz: 6c643c41faaf2246fb7770a44f24af71435211652f804f0355c485b7444112e5286763dc43e89bd113694fb887a7507b62952348e5d10cad07417786be9000e0
|
@@ -76,13 +76,6 @@ Style/BlockDelimiters:
|
|
76
76
|
- proc
|
77
77
|
- it
|
78
78
|
|
79
|
-
Style/BracesAroundHashParameters:
|
80
|
-
EnforcedStyle: no_braces
|
81
|
-
SupportedStyles:
|
82
|
-
- braces
|
83
|
-
- no_braces
|
84
|
-
- context_dependent
|
85
|
-
|
86
79
|
Layout/CaseIndentation:
|
87
80
|
EnforcedStyle: end
|
88
81
|
SupportedStyles:
|
@@ -509,7 +502,7 @@ Style/WhileUntilModifier:
|
|
509
502
|
Metrics/BlockNesting:
|
510
503
|
Max: 3
|
511
504
|
|
512
|
-
|
505
|
+
Layout/LineLength:
|
513
506
|
Max: 120
|
514
507
|
AllowHeredoc: true
|
515
508
|
AllowURI: true
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql-metrics (
|
4
|
+
graphql-metrics (4.0.0)
|
5
5
|
concurrent-ruby (~> 1.1.0)
|
6
|
-
graphql (>= 1.
|
6
|
+
graphql (>= 1.10.8)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -19,8 +19,8 @@ GEM
|
|
19
19
|
diffy (3.3.0)
|
20
20
|
fakeredis (0.7.0)
|
21
21
|
redis (>= 3.2, < 5.0)
|
22
|
-
graphql (1.
|
23
|
-
graphql-batch (0.4.
|
22
|
+
graphql (1.10.8)
|
23
|
+
graphql-batch (0.4.2)
|
24
24
|
graphql (>= 1.3, < 2)
|
25
25
|
promise.rb (~> 0.7.2)
|
26
26
|
hashdiff (1.0.0)
|
data/graphql_metrics.gemspec
CHANGED
@@ -30,9 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
+
spec.add_runtime_dependency "graphql", ">= 1.10.8"
|
33
34
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.1.0"
|
34
|
-
spec.add_runtime_dependency "graphql", ">= 1.9.5", "< 1.10.0"
|
35
|
-
|
36
35
|
spec.add_development_dependency "rake", "~> 10.0"
|
37
36
|
spec.add_development_dependency "minitest", "~> 5.0"
|
38
37
|
spec.add_development_dependency 'graphql-batch'
|
@@ -35,14 +35,14 @@ module GraphQL
|
|
35
35
|
return if visitor.field_definition.introspection?
|
36
36
|
return if query.context[SKIP_FIELD_AND_ARGUMENT_METRICS]
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
extract_arguments(
|
38
|
+
argument_values = query.arguments_for(node, visitor.field_definition)
|
39
|
+
|
40
|
+
extract_arguments(argument_values, visitor.field_definition)
|
41
41
|
|
42
42
|
static_metrics = {
|
43
43
|
field_name: node.name,
|
44
|
-
return_type_name: visitor.type_definition.
|
45
|
-
parent_type_name: visitor.parent_type_definition.
|
44
|
+
return_type_name: visitor.type_definition.graphql_name,
|
45
|
+
parent_type_name: visitor.parent_type_definition.graphql_name,
|
46
46
|
deprecated: visitor.field_definition.deprecation_reason.present?,
|
47
47
|
path: visitor.response_path,
|
48
48
|
}
|
@@ -93,16 +93,16 @@ module GraphQL
|
|
93
93
|
argument.each_value do |a|
|
94
94
|
extract_arguments(a, field_defn, parent_input_object)
|
95
95
|
end
|
96
|
-
when ::GraphQL::
|
96
|
+
when ::GraphQL::Execution::Interpreter::Arguments
|
97
97
|
argument.each_value do |arg_val|
|
98
98
|
extract_arguments(arg_val, field_defn, parent_input_object)
|
99
99
|
end
|
100
|
-
when ::GraphQL::
|
100
|
+
when ::GraphQL::Execution::Interpreter::ArgumentValue
|
101
101
|
extract_argument(argument, field_defn, parent_input_object)
|
102
102
|
extract_arguments(argument.value, field_defn, parent_input_object)
|
103
103
|
when ::GraphQL::Schema::InputObject
|
104
104
|
input_object_argument_values = argument.arguments.argument_values.values
|
105
|
-
parent_input_object = input_object_argument_values.first&.definition&.
|
105
|
+
parent_input_object = input_object_argument_values.first&.definition&.owner
|
106
106
|
|
107
107
|
extract_arguments(input_object_argument_values, field_defn, parent_input_object)
|
108
108
|
end
|
@@ -110,10 +110,10 @@ module GraphQL
|
|
110
110
|
|
111
111
|
def extract_argument(value, field_defn, parent_input_object = nil)
|
112
112
|
static_metrics = {
|
113
|
-
argument_name: value.definition.
|
114
|
-
argument_type_name: value.definition.type.unwrap.
|
115
|
-
parent_field_name: field_defn.
|
116
|
-
parent_field_type_name: field_defn.
|
113
|
+
argument_name: value.definition.graphql_name,
|
114
|
+
argument_type_name: value.definition.type.unwrap.graphql_name,
|
115
|
+
parent_field_name: field_defn.graphql_name,
|
116
|
+
parent_field_type_name: field_defn.owner.graphql_name,
|
117
117
|
parent_input_object_type: parent_input_object&.graphql_name,
|
118
118
|
default_used: value.default_used?,
|
119
119
|
value_is_null: value.value.nil?,
|
metadata
CHANGED
@@ -1,49 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Butcher
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: graphql
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.10.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.10.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: concurrent-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.9.5
|
34
|
-
- - "<"
|
31
|
+
- - "~>"
|
35
32
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.
|
33
|
+
version: 1.1.0
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- - "
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.9.5
|
44
|
-
- - "<"
|
38
|
+
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.
|
40
|
+
version: 1.1.0
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rake
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|