Skip to content

Commit 72a2eec

Browse files
authored
Merge branch 'master' into allow-loading-schema-from-sdl-definition
2 parents 393dea4 + 6573ddd commit 72a2eec

File tree

13 files changed

+59
-59
lines changed

13 files changed

+59
-59
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
- "~> 7.0.0"
2525
- "~> 7.1.0"
2626
steps:
27-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2828
- name: Set up Ruby ${{ matrix.ruby_version }}
29-
uses: ruby/setup-ruby@52753b7da854d5c07df37391a986c76ab4615999 # v1
29+
uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1
3030
with:
3131
ruby-version: ${{ matrix.ruby_version }}
3232
- name: Build and test
@@ -40,9 +40,9 @@ jobs:
4040
name: Rubocop
4141
runs-on: ubuntu-latest
4242
steps:
43-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
43+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4444
- name: Set up Ruby
45-
uses: ruby/setup-ruby@52753b7da854d5c07df37391a986c76ab4615999 # v1
45+
uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1
4646
with:
4747
ruby-version: 3.2
4848
- name: Build and test

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
id-token: write
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
15-
- uses: ruby/setup-ruby@52753b7da854d5c07df37391a986c76ab4615999 # v1
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
- uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1
1616
with:
1717
bundler-cache: true
1818
ruby-version: ruby

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gemspec
55
rails_version = ENV["RAILS_VERSION"] == "edge" ? { github: "rails/rails" } : ENV["RAILS_VERSION"]
66
gem "actionpack", rails_version
77
gem "activesupport", rails_version
8+
gem "concurrent-ruby", "1.3.4"
89

910
graphql_version = ENV["GRAPHQL_VERSION"] == "edge" ? { github: "rmosolgo/graphql-ruby", ref: "interpreter-without-legacy" } : ENV["GRAPHQL_VERSION"]
1011
gem "graphql", graphql_version

graphql-client.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
1818
s.add_development_dependency "minitest", "~> 5.9"
1919
s.add_development_dependency "rake", "~> 13.2.1"
2020
s.add_development_dependency "rubocop-github"
21-
s.add_development_dependency "rubocop", "~> 1.66.1"
21+
s.add_development_dependency "rubocop", "~> 1.75.8"
2222

2323
s.required_ruby_version = ">= 2.1.0"
2424

lib/graphql/client/erb.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# frozen_string_literal: true
22
require "action_view"
3+
require "logger"
34

45
module GraphQL
56
class Client

lib/rubocop/cop/graphql/heredoc.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module RuboCop
55
module Cop
66
module GraphQL
77
# Public: Cop for enforcing non-interpolated GRAPHQL heredocs.
8-
class Heredoc < Cop
8+
class Heredoc < Base
99
def on_dstr(node)
1010
check_str(node)
1111
end
@@ -19,11 +19,11 @@ def check_str(node)
1919
return unless node.location.expression.source =~ /^<<(-|~)?GRAPHQL/
2020

2121
node.each_child_node(:begin) do |begin_node|
22-
add_offense(begin_node, location: :expression, message: "Do not interpolate variables into GraphQL queries, " \
22+
add_offense(begin_node, message: "Do not interpolate variables into GraphQL queries, " \
2323
"used variables instead.")
2424
end
2525

26-
add_offense(node, location: :expression, message: "GraphQL heredocs should be quoted. <<-'GRAPHQL'")
26+
add_offense(node, message: "GraphQL heredocs should be quoted. <<-'GRAPHQL'")
2727
end
2828

2929
def autocorrect(node)

lib/rubocop/cop/graphql/overfetch.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module RuboCop
88
module Cop
99
module GraphQL
1010
# Public: Rubocop for catching overfetched fields in ERB templates.
11-
class Overfetch < Cop
11+
class Overfetch < Base
1212
if defined?(RangeHelp)
1313
# rubocop 0.53 moved the #source_range method into this module
1414
include RangeHelp
@@ -42,7 +42,7 @@ def investigate(processed_source)
4242

4343
visitor.fields.each do |field, count|
4444
next if count > 0
45-
add_offense(nil, location: visitor.ranges[field], message: "GraphQL field '#{field}' query but was not used in template.")
45+
add_offense(visitor.ranges[field], message: "GraphQL field '#{field}' query but was not used in template.")
4646
end
4747
end
4848

test/test_client_errors.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def test_errors_collection
310310
"errors" => [
311311
{
312312
"message" => "b00m",
313-
"locations" => [{"line" => 1, "column" => 3}],
313+
"locations" => [{ "line" => 1, "column" => 3 }],
314314
"path" => ["nullableError"]
315315
}
316316
]

test/test_client_fetch.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ def self.resolve_type(_type, _obj, _ctx)
7979
refute response.data
8080

8181
refute_empty response.errors
82-
assert_equal "Field 'err' doesn't exist on type 'Query'", response.errors[:data][0]
82+
assert_includes response.errors[:data][0], "Field 'err' doesn't exist on type 'Query'"
8383

8484
refute_empty response.errors.all
85-
assert_equal "Field 'err' doesn't exist on type 'Query'", response.errors[:data][0]
85+
assert_includes response.errors[:data][0], "Field 'err' doesn't exist on type 'Query'"
8686
end
8787

8888
def test_failed_response

test/test_client_schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_dump_schema_io
6767

6868
def test_dump_schema_context
6969
conn = FakeConn.new
70-
GraphQL::Client.dump_schema(conn, StringIO.new, context: { user_id: 1})
70+
GraphQL::Client.dump_schema(conn, StringIO.new, context: { user_id: 1 })
7171
assert_equal({ user_id: 1 }, conn.context)
7272
end
7373
end

0 commit comments

Comments
 (0)