graphql-client 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d469dea9c19c2b7b70f57554d66dab3374c496ef09bc013d9464509faac1243
4
- data.tar.gz: 7fdc9c16119e205cc1e200ee4fc5d882776bbd94c1294dc075963428d7d9f7e4
3
+ metadata.gz: d645f13f9acd753d166f82ceea2e8a19fe8695ff2e00ac7ae505a2b0f784560e
4
+ data.tar.gz: ffa8a0bf2a8264314395494cac66960d7ade04e5eae650d57e19c76c9f64d5f8
5
5
  SHA512:
6
- metadata.gz: 51ad31a0fd1faf1275037177e7b22f29f597ab9c03868831422de07f563a1c2911a32372832f45053c2430648a267067a721b66df5697fbc1e8735fefddf78b1
7
- data.tar.gz: 6162d16ba9cefdd82356c89fd799744bcb0777716c0a379c403f519c4aa5fb1c1d2a0a15955852f31d76326fcb6ceebb24fc861c85d211078e5b492bbbc95e0f
6
+ metadata.gz: 73836d82fe18274ac579b2426c1625a76248cba2ae04dd51bdea84baecaeb550197958a8359ffcce5bcec8016f2d874751ac5fbe28ca509ddc0c49eaa22d356e
7
+ data.tar.gz: c3f3e78d79d2147ec051569ff807c75740ed3b92407ca18c3c1d4b11b7af557782b26acdf0207892e10ae8e65c572bb08d1ba1b611c883291f71befca55d47be
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # graphql-client [![Gem Version](https://badge.fury.io/rb/graphql-client.svg)](https://badge.fury.io/rb/graphql-client) [![CI](https://github.com/github/graphql-client/workflows/CI/badge.svg)](https://github.com/github/graphql-client/actions?query=workflow)
1
+ # graphql-client [![Gem Version](https://badge.fury.io/rb/graphql-client.svg)](https://badge.fury.io/rb/graphql-client) [![CI](https://github.com/github-community-projects/graphql-client/workflows/CI/badge.svg)](https://github.com/github-community-projects/graphql-client/actions?query=workflow)
2
2
 
3
3
  GraphQL Client is a Ruby library for declaring, composing and executing GraphQL queries.
4
4
 
@@ -21,7 +21,7 @@ module GraphQL
21
21
  errors.each do |error|
22
22
  path = ["data"]
23
23
  current = data
24
- error.fetch("path", []).each do |key|
24
+ error["path"].to_a.each do |key|
25
25
  break unless current
26
26
  path << key
27
27
  current = current[key]
@@ -16,11 +16,18 @@ module GraphQL
16
16
  # GraphQL::Client::LogSubscriber.attach_to :graphql
17
17
  #
18
18
  class LogSubscriber < ActiveSupport::LogSubscriber
19
+ SHOULD_USE_KWARGS = private_instance_methods.include?(:mode_from)
20
+
19
21
  def query(event)
20
22
  logger.info do
21
23
  name = event.payload[:operation_name].gsub("__", "::")
22
24
  type = event.payload[:operation_type].upcase
23
- color("#{name} #{type} (#{event.duration.round(1)}ms)", nil, true)
25
+
26
+ if SHOULD_USE_KWARGS
27
+ color("#{name} #{type} (#{event.duration.round(1)}ms)", nil, bold: true)
28
+ else
29
+ color("#{name} #{type} (#{event.duration.round(1)}ms)", nil, true)
30
+ end
24
31
  end
25
32
 
26
33
  logger.debug do
@@ -32,7 +39,12 @@ module GraphQL
32
39
  logger.error do
33
40
  name = event.payload[:operation_name].gsub("__", "::")
34
41
  message = event.payload[:message]
35
- color("#{name} ERROR: #{message}", nil, true)
42
+
43
+ if SHOULD_USE_KWARGS
44
+ color("#{name} ERROR: #{message}", nil, bold: true)
45
+ else
46
+ color("#{name} ERROR: #{message}", nil, true)
47
+ end
36
48
  end
37
49
  end
38
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.13.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 1.13.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: actionpack
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -180,11 +180,12 @@ files:
180
180
  - lib/graphql/client/view_module.rb
181
181
  - lib/rubocop/cop/graphql/heredoc.rb
182
182
  - lib/rubocop/cop/graphql/overfetch.rb
183
- homepage: https://github.com/github/graphql-client
183
+ homepage: https://github.com/github-community-projects/graphql-client
184
184
  licenses:
185
185
  - MIT
186
- metadata: {}
187
- post_install_message:
186
+ metadata:
187
+ rubygems_mfa_required: 'true'
188
+ post_install_message:
188
189
  rdoc_options: []
189
190
  require_paths:
190
191
  - lib
@@ -199,8 +200,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
200
  - !ruby/object:Gem::Version
200
201
  version: '0'
201
202
  requirements: []
202
- rubygems_version: 3.1.6
203
- signing_key:
203
+ rubygems_version: 3.5.3
204
+ signing_key:
204
205
  specification_version: 4
205
206
  summary: GraphQL Client
206
207
  test_files: []