rack-graphql 3.6.0 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundler-version +1 -1
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/auto-approve.yml +4 -3
- data/.github/workflows/auto-merge.yml +13 -4
- data/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +32 -40
- data/lib/rack_graphql/application.rb +0 -1
- data/lib/rack_graphql/health_response_builder.rb +1 -1
- data/lib/rack_graphql/middleware.rb +7 -8
- data/lib/rack_graphql/version.rb +1 -1
- data/lib/rack_graphql.rb +1 -1
- data/rack-graphql.gemspec +2 -2
- metadata +8 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dae49ce19bfc15635ecbc96b8577aac5670c9ff7c4d8a3d49b89f0e84d416d0
|
4
|
+
data.tar.gz: a758aacdbf0c85b4292cea6f58c3df71f6ac1c4e9cd7ed78fd509f0c36d6eb0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4b52740f5d98d7b3e6947737700f371040edd5dbb3bf3dabb8f134793a5dedd135edf33bf9d5682bd4dc1b0f164f1b21ea4774159a43e15752c1adc3d7ea682
|
7
|
+
data.tar.gz: 22be795ea42e466bcb2320c1b5ecfa6a2c78801dadb55e5c64b45849690561c16423fd344db368f8f2adb2bc83ecd4aeed7f8197dc972f345ca98f4db5b7a250
|
data/.bundler-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.3
|
@@ -1,13 +1,14 @@
|
|
1
1
|
name: Auto approve dependency upgrades and hot-fix PRs
|
2
2
|
on:
|
3
3
|
pull_request_target:
|
4
|
-
types:
|
5
|
-
|
4
|
+
types:
|
5
|
+
- labeled
|
6
|
+
- ready_for_review
|
6
7
|
jobs:
|
7
8
|
auto-approve:
|
8
9
|
runs-on: ubuntu-latest
|
9
10
|
steps:
|
10
11
|
- uses: hmarr/auto-approve-action@v3
|
11
|
-
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'dependencies')
|
12
|
+
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'self-approve') || contains(github.event.pull_request.labels.*.name, 'dependencies')
|
12
13
|
with:
|
13
14
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
@@ -1,22 +1,31 @@
|
|
1
1
|
name: automerge
|
2
2
|
on:
|
3
|
+
pull_request_target:
|
4
|
+
types:
|
5
|
+
- labeled
|
3
6
|
pull_request_review:
|
4
7
|
types:
|
5
8
|
- submitted
|
6
9
|
check_suite:
|
7
10
|
types:
|
8
11
|
- completed
|
9
|
-
label:
|
10
|
-
types:
|
11
|
-
- created
|
12
12
|
status: {}
|
13
13
|
jobs:
|
14
14
|
automerge:
|
15
15
|
runs-on: ubuntu-latest
|
16
16
|
steps:
|
17
17
|
- name: automerge
|
18
|
-
uses: pascalgn/automerge-action@v0.16.
|
18
|
+
uses: pascalgn/automerge-action@v0.16.4
|
19
|
+
env:
|
20
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
21
|
+
MERGE_METHOD: squash
|
22
|
+
MERGE_DELETE_BRANCH: true
|
23
|
+
MERGE_LABELS: "automerge,!automerge blocked"
|
24
|
+
- name: automerge-dependencies
|
25
|
+
uses: pascalgn/automerge-action@v0.16.4
|
19
26
|
env:
|
20
27
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
21
28
|
MERGE_METHOD: squash
|
22
29
|
MERGE_DELETE_BRANCH: true
|
30
|
+
MERGE_LABELS: "dependencies,!automerge blocked"
|
31
|
+
MERGE_REMOVE_LABELS: ""
|
data/.github/workflows/ci.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rack-graphql (3.
|
4
|
+
rack-graphql (3.8.0)
|
5
5
|
graphql (~> 2.0)
|
6
|
-
|
6
|
+
json (>= 2.8.0)
|
7
7
|
rack (>= 2.2.6)
|
8
8
|
|
9
9
|
GEM
|
@@ -12,72 +12,64 @@ GEM
|
|
12
12
|
ast (2.4.2)
|
13
13
|
awesome_print (1.9.2)
|
14
14
|
base64 (0.2.0)
|
15
|
-
bigdecimal (3.1.7)
|
16
15
|
coderay (1.1.3)
|
17
16
|
diff-lcs (1.5.1)
|
18
|
-
|
17
|
+
fiber-storage (1.0.0)
|
18
|
+
graphql (2.4.9)
|
19
19
|
base64
|
20
|
-
|
21
|
-
|
20
|
+
fiber-storage
|
21
|
+
logger
|
22
|
+
json (2.9.1)
|
23
|
+
language_server-protocol (3.17.0.4)
|
24
|
+
logger (1.6.5)
|
22
25
|
method_source (1.1.0)
|
23
|
-
|
24
|
-
|
25
|
-
parallel (1.24.0)
|
26
|
-
parser (3.3.0.5)
|
26
|
+
parallel (1.26.3)
|
27
|
+
parser (3.3.7.1)
|
27
28
|
ast (~> 2.4.1)
|
28
29
|
racc
|
29
|
-
pry (0.
|
30
|
+
pry (0.15.2)
|
30
31
|
coderay (~> 1.1)
|
31
32
|
method_source (~> 1.0)
|
32
|
-
racc (1.
|
33
|
-
rack (3.
|
34
|
-
rack-test (2.
|
33
|
+
racc (1.8.1)
|
34
|
+
rack (3.1.9)
|
35
|
+
rack-test (2.2.0)
|
35
36
|
rack (>= 1.3)
|
36
37
|
rainbow (3.1.1)
|
37
38
|
rake (13.2.1)
|
38
|
-
regexp_parser (2.
|
39
|
-
rexml (3.2.6)
|
39
|
+
regexp_parser (2.10.0)
|
40
40
|
rspec (3.13.0)
|
41
41
|
rspec-core (~> 3.13.0)
|
42
42
|
rspec-expectations (~> 3.13.0)
|
43
43
|
rspec-mocks (~> 3.13.0)
|
44
|
-
rspec-core (3.13.
|
44
|
+
rspec-core (3.13.2)
|
45
45
|
rspec-support (~> 3.13.0)
|
46
|
-
rspec-expectations (3.13.
|
46
|
+
rspec-expectations (3.13.3)
|
47
47
|
diff-lcs (>= 1.2.0, < 2.0)
|
48
48
|
rspec-support (~> 3.13.0)
|
49
|
-
rspec-mocks (3.13.
|
49
|
+
rspec-mocks (3.13.2)
|
50
50
|
diff-lcs (>= 1.2.0, < 2.0)
|
51
51
|
rspec-support (~> 3.13.0)
|
52
|
-
rspec-support (3.13.
|
53
|
-
rubocop (1.
|
52
|
+
rspec-support (3.13.2)
|
53
|
+
rubocop (1.71.2)
|
54
54
|
json (~> 2.3)
|
55
55
|
language_server-protocol (>= 3.17.0)
|
56
56
|
parallel (~> 1.10)
|
57
57
|
parser (>= 3.3.0.2)
|
58
58
|
rainbow (>= 2.2.2, < 4.0)
|
59
|
-
regexp_parser (>=
|
60
|
-
|
61
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
59
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
60
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
62
61
|
ruby-progressbar (~> 1.7)
|
63
|
-
unicode-display_width (>= 2.4.0, <
|
64
|
-
rubocop-ast (1.
|
65
|
-
parser (>= 3.3.0
|
66
|
-
rubocop-capybara (2.20.0)
|
67
|
-
rubocop (~> 1.41)
|
68
|
-
rubocop-factory_bot (2.25.1)
|
69
|
-
rubocop (~> 1.41)
|
62
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
63
|
+
rubocop-ast (1.38.0)
|
64
|
+
parser (>= 3.3.1.0)
|
70
65
|
rubocop-rake (0.6.0)
|
71
66
|
rubocop (~> 1.0)
|
72
|
-
rubocop-rspec (
|
73
|
-
rubocop (~> 1.
|
74
|
-
rubocop-capybara (~> 2.17)
|
75
|
-
rubocop-factory_bot (~> 2.22)
|
76
|
-
rubocop-rspec_rails (~> 2.28)
|
77
|
-
rubocop-rspec_rails (2.28.3)
|
78
|
-
rubocop (~> 1.40)
|
67
|
+
rubocop-rspec (3.4.0)
|
68
|
+
rubocop (~> 1.61)
|
79
69
|
ruby-progressbar (1.13.0)
|
80
|
-
unicode-display_width (
|
70
|
+
unicode-display_width (3.1.4)
|
71
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
72
|
+
unicode-emoji (4.0.4)
|
81
73
|
|
82
74
|
PLATFORMS
|
83
75
|
aarch64-linux-musl
|
@@ -101,4 +93,4 @@ DEPENDENCIES
|
|
101
93
|
rubocop-rspec
|
102
94
|
|
103
95
|
BUNDLED WITH
|
104
|
-
2.
|
96
|
+
2.6.3
|
@@ -16,7 +16,6 @@ module RackGraphql
|
|
16
16
|
error_status_code_map: {},
|
17
17
|
request_epilogue: -> {}
|
18
18
|
)
|
19
|
-
|
20
19
|
@schema = schema
|
21
20
|
@app_name = app_name
|
22
21
|
@context_handler = context_handler || ->(_) {}
|
@@ -55,7 +54,7 @@ module RackGraphql
|
|
55
54
|
[
|
56
55
|
400,
|
57
56
|
{ 'Content-Type' => 'application/json', STATUS_CODE_HEADER_NAME => 400 },
|
58
|
-
[
|
57
|
+
[JSON.dump({})]
|
59
58
|
]
|
60
59
|
rescue StandardError, LoadError, SyntaxError => e
|
61
60
|
# To respect the graphql spec, all errors need to be returned as json.
|
@@ -74,7 +73,7 @@ module RackGraphql
|
|
74
73
|
[
|
75
74
|
status_code,
|
76
75
|
{ 'Content-Type' => 'application/json', STATUS_CODE_HEADER_NAME => status_code },
|
77
|
-
[
|
76
|
+
[JSON.dump('errors' => [exception_hash(e)])]
|
78
77
|
]
|
79
78
|
ensure
|
80
79
|
request_epilogue.call
|
@@ -94,8 +93,8 @@ module RackGraphql
|
|
94
93
|
payload = env['rack.input'].read.to_s
|
95
94
|
return nil if payload.index(NULL_BYTE)
|
96
95
|
|
97
|
-
::
|
98
|
-
rescue
|
96
|
+
::JSON.parse(payload)
|
97
|
+
rescue JSON::ParserError
|
99
98
|
nil
|
100
99
|
end
|
101
100
|
|
@@ -106,8 +105,8 @@ module RackGraphql
|
|
106
105
|
return {} if ambiguous_param.empty?
|
107
106
|
|
108
107
|
begin
|
109
|
-
ensure_hash(
|
110
|
-
rescue
|
108
|
+
ensure_hash(JSON.parse(ambiguous_param))
|
109
|
+
rescue JSON::ParserError
|
111
110
|
raise AmbiguousParamError, "Unexpected parameter: #{ambiguous_param}"
|
112
111
|
end
|
113
112
|
when Hash
|
@@ -178,7 +177,7 @@ module RackGraphql
|
|
178
177
|
else
|
179
178
|
body = result.to_h
|
180
179
|
end
|
181
|
-
|
180
|
+
JSON.dump(body)
|
182
181
|
end
|
183
182
|
|
184
183
|
def result_subscription?(result)
|
data/lib/rack_graphql/version.rb
CHANGED
data/lib/rack_graphql.rb
CHANGED
data/rack-graphql.gemspec
CHANGED
@@ -24,9 +24,9 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ['lib']
|
26
26
|
|
27
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 3.
|
27
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.3.0')
|
28
28
|
|
29
29
|
spec.add_dependency 'graphql', '~> 2.0'
|
30
|
-
spec.add_dependency '
|
30
|
+
spec.add_dependency 'json', '>= 2.8.0'
|
31
31
|
spec.add_dependency 'rack', '>= 2.2.6'
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-05 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: graphql
|
@@ -25,19 +24,19 @@ dependencies:
|
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '2.0'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
27
|
+
name: json
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
32
|
+
version: 2.8.0
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
39
|
+
version: 2.8.0
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: rack
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +51,6 @@ dependencies:
|
|
52
51
|
- - ">="
|
53
52
|
- !ruby/object:Gem::Version
|
54
53
|
version: 2.2.6
|
55
|
-
description:
|
56
54
|
email:
|
57
55
|
- knapo@knapo.net
|
58
56
|
executables: []
|
@@ -65,6 +63,7 @@ files:
|
|
65
63
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
66
64
|
- ".github/ISSUE_TEMPLATE/story.md"
|
67
65
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
66
|
+
- ".github/dependabot.yml"
|
68
67
|
- ".github/workflows/auto-approve.yml"
|
69
68
|
- ".github/workflows/auto-merge.yml"
|
70
69
|
- ".github/workflows/ci.yml"
|
@@ -92,7 +91,6 @@ metadata:
|
|
92
91
|
source_code_uri: https://github.com/RenoFi/rack-graphql
|
93
92
|
changelog_uri: https://github.com/RenoFi/rack-graphql/blob/master/CHANGELOG.md
|
94
93
|
rubygems_mfa_required: 'true'
|
95
|
-
post_install_message:
|
96
94
|
rdoc_options: []
|
97
95
|
require_paths:
|
98
96
|
- lib
|
@@ -100,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
98
|
requirements:
|
101
99
|
- - ">="
|
102
100
|
- !ruby/object:Gem::Version
|
103
|
-
version: 3.
|
101
|
+
version: 3.3.0
|
104
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
103
|
requirements:
|
106
104
|
- - ">="
|
107
105
|
- !ruby/object:Gem::Version
|
108
106
|
version: '0'
|
109
107
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
111
|
-
signing_key:
|
108
|
+
rubygems_version: 3.6.3
|
112
109
|
specification_version: 4
|
113
110
|
summary: Rack middleware implementing graphql endpoint.
|
114
111
|
test_files: []
|