graphql-metrics 6.0.0 → 6.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a07023fbdc4beff81a392ca7dc3ae2e5c413807be91121b49ad05bb63e9f9a20
4
- data.tar.gz: c8c533731167efe52c0da74f1d5ee147bd69efb9e3c2eedd0a7a7302d956a187
3
+ metadata.gz: 315fadbeefcfba11dcde6e9f60786b414c6351e891800ac908bd491b40a50ecd
4
+ data.tar.gz: cae83709e2add17cf2534486932c504d216784402fae02c994afd911d0bb42be
5
5
  SHA512:
6
- metadata.gz: e6f0d75f489119e17d55fc83d8bfe0aa0601ccb54dc5fa5e97fa435746b130ffe5dd1f95114be8c40c44f6350b2357381986c3602e317c7c76b10bc98b233c7e
7
- data.tar.gz: 35613ab78775485ede19e0ba178f7151e2239b091e4b7832e9fcba06c7c97cba7cecddea05042cad131f426c877e96156a54cc91afee2d4c5e33973673f7bb3a
6
+ metadata.gz: f9e9b56eabf8f9993501b9bf805c05515ba5bba50e908f1aa10c205534208f1b60b6da90c3a2e951bb08fa6387860089decca0bcaea0b87649a5d42e5842cc6c
7
+ data.tar.gz: 3a513f4d6f25732972db556526bba42884ef41389cee0f372a0bd373ce71853889ea70e4cad5c042ad3956f3ea4e22cbbc1d5871f9d340e6e433499a7ffbbde2
@@ -11,6 +11,10 @@ registries:
11
11
  username: ${{secrets.DEPENDENCIES_GITHUB_USER}}
12
12
  password: ${{secrets.DEPENDENCIES_GITHUB_TOKEN}}
13
13
  updates:
14
+ - package-ecosystem: github-actions
15
+ directory: "/"
16
+ schedule:
17
+ interval: weekly
14
18
  - package-ecosystem: bundler
15
19
  directory: "/"
16
20
  schedule:
@@ -12,7 +12,7 @@ jobs:
12
12
  steps:
13
13
  - name: Dependabot metadata
14
14
  id: metadata
15
- uses: dependabot/fetch-metadata@v2
15
+ uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
16
16
  with:
17
17
  github-token: "${{ secrets.GITHUB_TOKEN }}"
18
18
  - name: Enable auto-merge for Dependabot PRs
@@ -0,0 +1,52 @@
1
+ name: Release gem on RubyGems.org and create GitHub release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]+.[0-9]+.[0-9]+'
7
+
8
+ jobs:
9
+ release_gem:
10
+ name: Release gem on RubyGems.org
11
+ if: github.repository == 'Shopify/graphql-metrics'
12
+ runs-on: ubuntu-latest
13
+
14
+ permissions:
15
+ contents: write
16
+ id-token: write
17
+
18
+ environment: release
19
+
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23
+ with:
24
+ persist-credentials: false
25
+
26
+ - name: Set up Ruby
27
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
28
+ with:
29
+ bundler-cache: true
30
+
31
+ - name: Release gem on RubyGems.org
32
+ uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1
33
+
34
+ release_github:
35
+ name: Create GitHub release
36
+ if: github.repository == 'Shopify/graphql-metrics'
37
+ needs: release_gem
38
+ runs-on: ubuntu-latest
39
+
40
+ permissions:
41
+ contents: write
42
+
43
+ steps:
44
+ - name: Checkout repository
45
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
46
+ with:
47
+ persist-credentials: false
48
+
49
+ - name: Create GitHub release
50
+ run: gh release create "${GITHUB_REF_NAME}" --verify-tag --generate-notes
51
+ env:
52
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -10,14 +10,14 @@ jobs:
10
10
  fail-fast: false
11
11
  matrix:
12
12
  os: [ubuntu-latest]
13
- ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
13
+ ruby: ['3.3', '3.4', '4.0']
14
14
  gemfile: ['graphql_2.3', 'graphql_head']
15
15
  runs-on: ${{ matrix.os }}
16
16
  env:
17
17
  BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
18
18
  steps:
19
- - uses: actions/checkout@v3
20
- - uses: ruby/setup-ruby@v1
19
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
21
21
  with:
22
22
  ruby-version: ${{ matrix.ruby }}
23
23
  bundler-cache: true
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.1
1
+ 4.0.9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 6.0.1
2
+ -----
3
+ - [149](https://github.com/Shopify/graphql-metrics/pull/149) Require Ruby 3.3 or newer
4
+ - [110](https://github.com/Shopify/graphql-metrics/pull/110) Fix missing `parent_input_object_type` in nested input object metrics
5
+
1
6
  6.0.0
2
7
  -----
3
8
 
data/Gemfile.lock CHANGED
@@ -1,65 +1,66 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-metrics (6.0.0)
4
+ graphql-metrics (6.0.1)
5
5
  graphql (>= 2.3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.1.7.5)
11
- concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 1.6, < 2)
13
- minitest (>= 5.1)
14
- tzinfo (~> 2.0)
15
- zeitwerk (~> 2.3)
16
- base64 (0.2.0)
17
- byebug (11.1.3)
10
+ base64 (0.3.0)
11
+ byebug (13.0.0)
12
+ reline (>= 0.6.0)
18
13
  coderay (1.1.3)
19
- concurrent-ruby (1.2.3)
20
- diffy (3.4.2)
14
+ diffy (3.4.3)
15
+ drb (2.2.3)
21
16
  fakeredis (0.9.2)
22
17
  redis (~> 4.8)
23
- graphql (2.3.0)
18
+ fiber-storage (1.0.1)
19
+ graphql (2.4.18)
24
20
  base64
21
+ fiber-storage
22
+ logger
25
23
  graphql-batch (0.6.0)
26
24
  graphql (>= 1.12.18, < 3)
27
25
  promise.rb (~> 0.7.2)
28
- hashdiff (1.1.0)
29
- i18n (1.14.4)
30
- concurrent-ruby (~> 1.0)
31
- method_source (1.0.0)
32
- minitest (5.22.3)
33
- minitest-focus (1.4.0)
34
- minitest (>= 4, < 6)
35
- mocha (2.1.0)
26
+ hashdiff (1.1.2)
27
+ io-console (0.9.5)
28
+ logger (1.7.0)
29
+ method_source (1.1.0)
30
+ minitest (6.1.0)
31
+ drb (~> 2.0)
32
+ prism (>= 1.5, < 3)
33
+ minitest-focus (1.4.1)
34
+ minitest (> 5.0)
35
+ mocha (2.7.1)
36
36
  ruby2_keywords (>= 0.0.5)
37
+ prism (2.1.0-arm64-darwin)
38
+ prism (2.1.0-x86_64-linux-gnu)
37
39
  promise.rb (0.7.4)
38
- pry (0.14.2)
40
+ pry (0.16.1)
39
41
  coderay (~> 1.1)
40
42
  method_source (~> 1.0)
41
- pry-byebug (3.10.1)
42
- byebug (~> 11.0)
43
- pry (>= 0.13, < 0.15)
44
- rake (13.1.0)
43
+ reline (>= 0.6.0)
44
+ pry-byebug (3.12.0)
45
+ byebug (~> 13.0)
46
+ pry (>= 0.13, < 0.17)
47
+ rake (13.2.1)
45
48
  redis (4.8.1)
49
+ reline (0.7.0)
50
+ io-console (~> 0.5)
46
51
  ruby2_keywords (0.0.5)
47
- tzinfo (2.0.6)
48
- concurrent-ruby (~> 1.0)
49
- zeitwerk (2.6.13)
50
52
 
51
53
  PLATFORMS
52
54
  arm64-darwin-23
53
55
  x86_64-linux
54
56
 
55
57
  DEPENDENCIES
56
- activesupport (~> 6.1.7)
57
58
  diffy
58
59
  fakeredis
59
60
  graphql-batch
60
61
  graphql-metrics!
61
62
  hashdiff
62
- minitest (~> 5.0)
63
+ minitest (~> 6.0)
63
64
  minitest-focus
64
65
  mocha
65
66
  pry
data/RELEASING CHANGED
@@ -2,14 +2,14 @@ Releasing graphql-metrics
2
2
 
3
3
  1. Check the Semantic Versioning page for info on how to version the new release: http://semver.org
4
4
  2. Update VERSION in lib/graphql/metrics/version.rb
5
- 3. Add a CHANGELOG entry for the new release
6
- 4. Commit the changes with a commit message like "Packaging for release X.Y.Z"
7
- 5. Tag the release with the version (Leave REV blank for HEAD or provide a SHA)
8
- $ git tag vX.Y.Z REV
9
- 6. Push out the changes
10
- $ git push
11
- 7. Push out the tags
12
- $ git push --tags
13
- 8. Publish the gem
14
- $ gem build graphql_metrics.gemspec
15
- $ gem push graphql-metrics-X.Y.Z.gem
5
+ 3. Run `bundle install` so Gemfile.lock picks up the new version
6
+ 4. Add a CHANGELOG entry for the new release
7
+ 5. Open a pull request with a title like "Packaging for release X.Y.Z" and merge it
8
+ 6. Tag the merge commit on main with the version and push the tag
9
+ $ git checkout main && git pull
10
+ $ git tag vX.Y.Z
11
+ $ git push origin vX.Y.Z
12
+
13
+ Pushing the tag runs the Release workflow (.github/workflows/release.yml),
14
+ which publishes the gem to RubyGems.org with trusted publishing and creates
15
+ a GitHub release with generated notes. No RubyGems API key is needed.
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/Shopify/graphql-metrics'
15
15
  spec.license = "MIT"
16
16
 
17
- spec.required_ruby_version = ">= 2.7"
17
+ spec.required_ruby_version = ">= 3.3"
18
18
 
19
19
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
20
20
 
@@ -27,9 +27,8 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_runtime_dependency "graphql", ">= 2.3"
29
29
  spec.add_development_dependency "rake", "~> 13.2"
30
- spec.add_development_dependency "minitest", "~> 5.0"
30
+ spec.add_development_dependency "minitest", "~> 6.0"
31
31
  spec.add_development_dependency 'graphql-batch'
32
- spec.add_development_dependency "activesupport", "~> 6.1.7"
33
32
  spec.add_development_dependency "pry"
34
33
  spec.add_development_dependency "pry-byebug"
35
34
  spec.add_development_dependency "mocha"
@@ -130,10 +130,19 @@ module GraphQL
130
130
  parent_input_object: parent_input_object,
131
131
  parent: parent
132
132
  )
133
+
134
+ # For nested InputObject arguments, we need to pass the InputObject type as the parent
135
+ # for its child fields to be properly attributed
136
+ parent_for_nested_fields = if argument.value.is_a?(::GraphQL::Schema::InputObject)
137
+ argument.value.class
138
+ else
139
+ parent_input_object
140
+ end
141
+
133
142
  extract_arguments(
134
- argument:argument.value,
143
+ argument: argument.value,
135
144
  definition: definition,
136
- parent_input_object: parent_input_object,
145
+ parent_input_object: parent_for_nested_fields,
137
146
  parent: parent
138
147
  )
139
148
  when ::GraphQL::Schema::InputObject
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module Metrics
5
- VERSION = "6.0.0"
5
+ VERSION = "6.0.1"
6
6
  end
7
7
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "graphql/metrics/version"
4
- require "graphql/metrics/instrumentation"
5
- require "graphql/metrics/trace"
6
- require "graphql/metrics/analyzer"
3
+ require_relative "metrics/version"
4
+ require_relative "metrics/instrumentation"
5
+ require_relative "metrics/trace"
6
+ require_relative "metrics/analyzer"
7
7
 
8
8
  module GraphQL
9
9
  module Metrics
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Butcher
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-09-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: graphql
@@ -44,14 +43,14 @@ dependencies:
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: '5.0'
46
+ version: '6.0'
48
47
  type: :development
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
- version: '5.0'
53
+ version: '6.0'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: graphql-batch
57
56
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +65,6 @@ dependencies:
66
65
  - - ">="
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: activesupport
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 6.1.7
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 6.1.7
83
68
  - !ruby/object:Gem::Dependency
84
69
  name: pry
85
70
  requirement: !ruby/object:Gem::Requirement
@@ -190,6 +175,7 @@ files:
190
175
  - ".github/dependabot.yml"
191
176
  - ".github/workflows/cla.yml"
192
177
  - ".github/workflows/dependabot_auto_merge.yml"
178
+ - ".github/workflows/release.yml"
193
179
  - ".github/workflows/ruby.yml"
194
180
  - ".gitignore"
195
181
  - ".rubocop-http---shopify-github-io-ruby-style-guide-rubocop-yml"
@@ -218,7 +204,6 @@ licenses:
218
204
  - MIT
219
205
  metadata:
220
206
  allowed_push_host: https://rubygems.org
221
- post_install_message:
222
207
  rdoc_options: []
223
208
  require_paths:
224
209
  - lib
@@ -226,15 +211,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
211
  requirements:
227
212
  - - ">="
228
213
  - !ruby/object:Gem::Version
229
- version: '2.7'
214
+ version: '3.3'
230
215
  required_rubygems_version: !ruby/object:Gem::Requirement
231
216
  requirements:
232
217
  - - ">="
233
218
  - !ruby/object:Gem::Version
234
219
  version: '0'
235
220
  requirements: []
236
- rubygems_version: 3.5.18
237
- signing_key:
221
+ rubygems_version: 4.0.20
238
222
  specification_version: 4
239
223
  summary: GraphQL Metrics Extractor
240
224
  test_files: []