graphql-hive 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +48 -1
- data/README.md +45 -32
- data/lib/graphql-hive/usage_reporter.rb +4 -3
- data/lib/graphql-hive/version.rb +1 -1
- data/lib/graphql-hive.rb +2 -0
- metadata +3 -19
- data/.github/workflows/benchmark.yml +0 -67
- data/examples/simple-api/Gemfile +0 -8
- data/examples/simple-api/Gemfile.lock +0 -48
- data/examples/simple-api/app.rb +0 -31
- data/examples/simple-api/config.ru +0 -2
- data/examples/simple-api/schema.rb +0 -52
- data/k6/README.md +0 -37
- data/k6/graphql-api/Gemfile +0 -9
- data/k6/graphql-api/Gemfile.lock +0 -52
- data/k6/graphql-api/app.rb +0 -26
- data/k6/graphql-api/config.ru +0 -2
- data/k6/graphql-api/schema.rb +0 -41
- data/k6/k6.js +0 -99
- data/k6/package.json +0 -11
- data/k6/usage-api.js +0 -26
- data/k6/yarn.lock +0 -405
- data/lib/graphql-hive/bounded_queue.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4176f281928e52d551ae77d96f837f449e32ecc4636d9f3c160c6c36121cef43
|
4
|
+
data.tar.gz: 71b3d0d1740cd707321c4970ad608fd73cae893561a6aa51b6ef288c2a955fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dd8fe627ef820bb26b8c20a3eb5fb9946bd87b4d3c36cff52c508f02aca17645ebc105314ada908b2dd926b176134e8e83d6c86b891849b5cf3c98d86db1ad0
|
7
|
+
data.tar.gz: b66d19f472e1e0034ae4eb42ab7f1ec14814216a6e7e71660aaaec4948c9b85287f947595043a41d9b31f7308cf9039af2978ef4af59f5edc2ed822410d890f8
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.5
|
data/Gemfile
CHANGED
@@ -9,7 +9,12 @@ gemspec
|
|
9
9
|
|
10
10
|
group :development do
|
11
11
|
gem "bundler", "~> 2"
|
12
|
+
gem "debug", ">= 1.0.0"
|
13
|
+
gem "rack-test", "~> 2"
|
12
14
|
gem "rake", "~> 13"
|
13
15
|
gem "rspec", "~> 3"
|
16
|
+
gem "sinatra", "~> 2"
|
14
17
|
gem "standardrb", "~> 1"
|
18
|
+
gem "vcr", "~> 6"
|
19
|
+
gem "webmock", "~> 3"
|
15
20
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,28 +1,56 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
graphql-hive (0.5.
|
4
|
+
graphql-hive (0.5.1)
|
5
5
|
graphql (>= 2.3, < 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
+
addressable (2.8.7)
|
11
|
+
public_suffix (>= 2.0.2, < 7.0)
|
10
12
|
ast (2.4.2)
|
11
13
|
base64 (0.2.0)
|
14
|
+
bigdecimal (3.1.8)
|
15
|
+
crack (1.0.0)
|
16
|
+
bigdecimal
|
17
|
+
rexml
|
18
|
+
debug (1.9.2)
|
19
|
+
irb (~> 1.10)
|
20
|
+
reline (>= 0.3.8)
|
12
21
|
diff-lcs (1.5.1)
|
13
22
|
graphql (2.3.7)
|
14
23
|
base64
|
24
|
+
hashdiff (1.1.1)
|
25
|
+
io-console (0.7.2)
|
26
|
+
irb (1.14.1)
|
27
|
+
rdoc (>= 4.0.0)
|
28
|
+
reline (>= 0.4.2)
|
15
29
|
json (2.7.2)
|
16
30
|
language_server-protocol (3.17.0.3)
|
17
31
|
lint_roller (1.1.0)
|
32
|
+
mustermann (2.0.2)
|
33
|
+
ruby2_keywords (~> 0.0.1)
|
18
34
|
parallel (1.26.3)
|
19
35
|
parser (3.3.5.0)
|
20
36
|
ast (~> 2.4.1)
|
21
37
|
racc
|
38
|
+
psych (5.1.2)
|
39
|
+
stringio
|
40
|
+
public_suffix (6.0.1)
|
22
41
|
racc (1.8.1)
|
42
|
+
rack (2.2.10)
|
43
|
+
rack-protection (2.2.4)
|
44
|
+
rack
|
45
|
+
rack-test (2.1.0)
|
46
|
+
rack (>= 1.3)
|
23
47
|
rainbow (3.1.1)
|
24
48
|
rake (13.2.1)
|
49
|
+
rdoc (6.7.0)
|
50
|
+
psych (>= 4.0.0)
|
25
51
|
regexp_parser (2.9.2)
|
52
|
+
reline (0.5.10)
|
53
|
+
io-console (~> 0.5)
|
26
54
|
rexml (3.3.8)
|
27
55
|
rspec (3.13.0)
|
28
56
|
rspec-core (~> 3.13.0)
|
@@ -54,6 +82,12 @@ GEM
|
|
54
82
|
rubocop (>= 1.48.1, < 2.0)
|
55
83
|
rubocop-ast (>= 1.31.1, < 2.0)
|
56
84
|
ruby-progressbar (1.13.0)
|
85
|
+
ruby2_keywords (0.0.5)
|
86
|
+
sinatra (2.2.4)
|
87
|
+
mustermann (~> 2.0)
|
88
|
+
rack (~> 2.2)
|
89
|
+
rack-protection (= 2.2.4)
|
90
|
+
tilt (~> 2.0)
|
57
91
|
standard (1.40.1)
|
58
92
|
language_server-protocol (~> 3.17.0.2)
|
59
93
|
lint_roller (~> 1.0)
|
@@ -68,7 +102,15 @@ GEM
|
|
68
102
|
rubocop-performance (~> 1.21.0)
|
69
103
|
standardrb (1.0.1)
|
70
104
|
standard
|
105
|
+
stringio (3.1.1)
|
106
|
+
tilt (2.4.0)
|
71
107
|
unicode-display_width (2.6.0)
|
108
|
+
vcr (6.3.1)
|
109
|
+
base64
|
110
|
+
webmock (3.24.0)
|
111
|
+
addressable (>= 2.8.0)
|
112
|
+
crack (>= 0.3.2)
|
113
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
72
114
|
|
73
115
|
PLATFORMS
|
74
116
|
arm64-darwin-23
|
@@ -76,10 +118,15 @@ PLATFORMS
|
|
76
118
|
|
77
119
|
DEPENDENCIES
|
78
120
|
bundler (~> 2)
|
121
|
+
debug (>= 1.0.0)
|
79
122
|
graphql-hive!
|
123
|
+
rack-test (~> 2)
|
80
124
|
rake (~> 13)
|
81
125
|
rspec (~> 3)
|
126
|
+
sinatra (~> 2)
|
82
127
|
standardrb (~> 1)
|
128
|
+
vcr (~> 6)
|
129
|
+
webmock (~> 3)
|
83
130
|
|
84
131
|
BUNDLED WITH
|
85
132
|
2.5.15
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# GraphQL Hive: `graphql-ruby` integration
|
1
|
+
# GraphQL Hive: `graphql-ruby` integration
|
2
2
|
[![CI Suite](https://github.com/charlypoly/graphql-ruby-hive/actions/workflows/ci.yml/badge.svg)](https://github.com/charlypoly/graphql-ruby-hive/actions)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/graphql-hive.svg)](https://rubygems.org/gems/graphql-hive)
|
4
4
|
|
@@ -146,38 +146,53 @@ class MySchema < GraphQL::Schema
|
|
146
146
|
use(
|
147
147
|
GraphQL::Hive,
|
148
148
|
{
|
149
|
-
#
|
150
|
-
token: 'YOUR-TOKEN',
|
151
|
-
|
152
|
-
# optional
|
153
|
-
|
154
|
-
|
149
|
+
# Token is the only required configuration value.
|
150
|
+
token: 'YOUR-REGISTRY-TOKEN',
|
151
|
+
#
|
152
|
+
# The following are optional configuration values.
|
153
|
+
#
|
154
|
+
# Enable/disable Hive Client.
|
155
|
+
enabled: true,
|
156
|
+
# Verbose logs.
|
157
|
+
debug: false,
|
158
|
+
# A custom logger.
|
155
159
|
logger: MyLogger.new,
|
160
|
+
# Endpoint and port of the Hive API. Change this if you are using a self-hosted Hive instance.
|
156
161
|
endpoint: 'app.graphql-hive.com',
|
157
162
|
port: 80,
|
158
|
-
|
159
|
-
|
160
|
-
|
163
|
+
# Number of operations sent to Hive in a batch (AFTER sampling).
|
164
|
+
buffer_size: 50,
|
165
|
+
# Size of the queue used to send operations to the buffer before sampling.
|
166
|
+
queue_size: 1000,
|
167
|
+
# Report usage to Hive.
|
168
|
+
collect_usage: true,
|
169
|
+
# Usage sampling configurations.
|
161
170
|
collect_usage_sampling: {
|
162
|
-
#
|
163
|
-
sample_rate: 0.5,
|
164
|
-
|
165
|
-
|
166
|
-
|
171
|
+
# % of operations recorded.
|
172
|
+
sample_rate: 0.5,
|
173
|
+
# Custom sampler to assign custom sampling rates.
|
174
|
+
sampler: proc { |context| context.operation_name.includes?('someQuery') 1 : 0.5 },
|
175
|
+
# Sample every distinct operation at least once.
|
176
|
+
at_least_once: true,
|
177
|
+
# Assign custom keys to distinguish between distinct operations.
|
178
|
+
key_generator: proc { |context| context.operation_name }
|
167
179
|
},
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
180
|
+
# Publish schema to Hive.
|
181
|
+
report_schema: true,
|
182
|
+
# Mandatory if `report_schema: true`.
|
183
|
+
reporting: {
|
184
|
+
# Mandatory members of `reporting`.
|
172
185
|
author: 'Author of the latest change',
|
173
186
|
commit: 'git sha or any identifier',
|
174
|
-
#
|
187
|
+
# Optional members of `reporting`.
|
175
188
|
service_name: '',
|
176
189
|
service_url: '',
|
177
190
|
},
|
178
191
|
|
179
|
-
|
180
|
-
client_info: proc { |context|
|
192
|
+
# Pass an optional proc to client_info to help identify the client (ex: Apollo web app) that performed the query.
|
193
|
+
client_info: proc { |context|
|
194
|
+
{ name: context.client_name, version: context.client_version }
|
195
|
+
}
|
181
196
|
}
|
182
197
|
)
|
183
198
|
|
@@ -186,16 +201,14 @@ class MySchema < GraphQL::Schema
|
|
186
201
|
end
|
187
202
|
```
|
188
203
|
|
189
|
-
See default options for the optional parameters [here](https://github.com/
|
204
|
+
See default options for the optional parameters [here](https://github.com/rperryng/graphql-ruby-hive/blob/master/lib/graphql-hive.rb#L31-L41).
|
190
205
|
|
191
206
|
<br/>
|
192
207
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
However, please note that a higher `buffer_size` value will introduce some peak of increase in memory consumption.
|
208
|
+
> [!Important]
|
209
|
+
> `buffer_size` and `queue_size` will affect memory consumption.
|
210
|
+
>
|
211
|
+
> `buffer_size` is the number of operations sent to Hive in a batch after operations have been sampled.
|
212
|
+
> `queue_size` is the size of the queue used to send operations to the buffer before sampling.
|
213
|
+
> Adjust these values according to your application's memory constraints and throughput.
|
214
|
+
> High throughput applications will need a larger `queue_size`.
|
@@ -3,7 +3,6 @@
|
|
3
3
|
require "digest"
|
4
4
|
require "graphql-hive/analyzer"
|
5
5
|
require "graphql-hive/printer"
|
6
|
-
require "graphql-hive/bounded_queue"
|
7
6
|
|
8
7
|
module GraphQL
|
9
8
|
class Hive < GraphQL::Tracing::PlatformTracing
|
@@ -21,13 +20,15 @@ module GraphQL
|
|
21
20
|
@client = client
|
22
21
|
@options_mutex = Mutex.new
|
23
22
|
@sampler = Sampler.new(options[:collect_usage_sampling], options[:logger]) # NOTE: logs for deprecated field
|
24
|
-
@queue =
|
23
|
+
@queue = Thread::SizedQueue.new(options[:queue_size])
|
25
24
|
|
26
25
|
start_thread
|
27
26
|
end
|
28
27
|
|
29
28
|
def add_operation(operation)
|
30
|
-
@queue.push(operation)
|
29
|
+
@queue.push(operation, true)
|
30
|
+
rescue ThreadError
|
31
|
+
@options[:logger].error("SizedQueue is full, discarding operation. Size: #{@queue.size}, Max: #{@queue.max}")
|
31
32
|
end
|
32
33
|
|
33
34
|
def on_exit
|
data/lib/graphql-hive/version.rb
CHANGED
data/lib/graphql-hive.rb
CHANGED
@@ -10,6 +10,7 @@ require "graphql-hive/client"
|
|
10
10
|
require "graphql-hive/sampler"
|
11
11
|
require "graphql-hive/sampling/basic_sampler"
|
12
12
|
require "graphql-hive/sampling/dynamic_sampler"
|
13
|
+
require "graphql"
|
13
14
|
|
14
15
|
module GraphQL
|
15
16
|
# GraphQL Hive usage collector and schema reporter
|
@@ -36,6 +37,7 @@ module GraphQL
|
|
36
37
|
read_operations: true,
|
37
38
|
report_schema: true,
|
38
39
|
buffer_size: 50,
|
40
|
+
queue_size: 1000,
|
39
41
|
logger: nil,
|
40
42
|
collect_usage_sampling: 1.0
|
41
43
|
}.freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-hive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charly POLY
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -38,11 +38,11 @@ executables: []
|
|
38
38
|
extensions: []
|
39
39
|
extra_rdoc_files: []
|
40
40
|
files:
|
41
|
-
- ".github/workflows/benchmark.yml"
|
42
41
|
- ".github/workflows/ci.yml"
|
43
42
|
- ".gitignore"
|
44
43
|
- ".rspec"
|
45
44
|
- ".rubocop.yml"
|
45
|
+
- ".ruby-version"
|
46
46
|
- Gemfile
|
47
47
|
- Gemfile.lock
|
48
48
|
- LICENSE
|
@@ -50,25 +50,9 @@ files:
|
|
50
50
|
- RELEASING.md
|
51
51
|
- Rakefile
|
52
52
|
- cover.png
|
53
|
-
- examples/simple-api/Gemfile
|
54
|
-
- examples/simple-api/Gemfile.lock
|
55
|
-
- examples/simple-api/app.rb
|
56
|
-
- examples/simple-api/config.ru
|
57
|
-
- examples/simple-api/schema.rb
|
58
53
|
- graphql-hive.gemspec
|
59
|
-
- k6/README.md
|
60
|
-
- k6/graphql-api/Gemfile
|
61
|
-
- k6/graphql-api/Gemfile.lock
|
62
|
-
- k6/graphql-api/app.rb
|
63
|
-
- k6/graphql-api/config.ru
|
64
|
-
- k6/graphql-api/schema.rb
|
65
|
-
- k6/k6.js
|
66
|
-
- k6/package.json
|
67
|
-
- k6/usage-api.js
|
68
|
-
- k6/yarn.lock
|
69
54
|
- lib/graphql-hive.rb
|
70
55
|
- lib/graphql-hive/analyzer.rb
|
71
|
-
- lib/graphql-hive/bounded_queue.rb
|
72
56
|
- lib/graphql-hive/client.rb
|
73
57
|
- lib/graphql-hive/printer.rb
|
74
58
|
- lib/graphql-hive/sampler.rb
|
@@ -1,67 +0,0 @@
|
|
1
|
-
name: Benchmark
|
2
|
-
on:
|
3
|
-
pull_request:
|
4
|
-
branches:
|
5
|
-
- master
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
benchmarks:
|
9
|
-
runs-on: ubuntu-latest
|
10
|
-
steps:
|
11
|
-
- name: Checkout Repository
|
12
|
-
uses: actions/checkout@v4
|
13
|
-
|
14
|
-
- name: Use Node
|
15
|
-
uses: actions/setup-node@v4
|
16
|
-
with:
|
17
|
-
node-version: 22
|
18
|
-
cache: 'yarn'
|
19
|
-
cache-dependency-path: 'k6/yarn.lock'
|
20
|
-
|
21
|
-
- name: Use Ruby
|
22
|
-
uses: ruby/setup-ruby@2a9a743e19810b9f3c38060637daf594dbd7b37f
|
23
|
-
with:
|
24
|
-
working-directory: ./k6/graphql-api
|
25
|
-
ruby-version: '3.3'
|
26
|
-
bundler-cache: true
|
27
|
-
|
28
|
-
- name: Start GraphQL API with hive enabled
|
29
|
-
working-directory: ./k6/graphql-api
|
30
|
-
run: |
|
31
|
-
bundle
|
32
|
-
bundle exec puma -t 0:1 -p 9292 &
|
33
|
-
npx wait-on http://localhost:9292 --timeout 5s
|
34
|
-
env:
|
35
|
-
HIVE_ENABLED: 'true'
|
36
|
-
|
37
|
-
- name: Start GraphQL API with hive disabled
|
38
|
-
working-directory: ./k6/graphql-api
|
39
|
-
run: |
|
40
|
-
bundle
|
41
|
-
bundle exec puma -t 0:1 -p 9291 &
|
42
|
-
npx wait-on http://localhost:9291 --timeout 5s
|
43
|
-
env:
|
44
|
-
HIVE_ENABLED: 'false'
|
45
|
-
|
46
|
-
- name: Start Fake Usage API
|
47
|
-
working-directory: ./k6/
|
48
|
-
run: |
|
49
|
-
yarn
|
50
|
-
node usage-api.js &
|
51
|
-
npx wait-on http://localhost:8888 --timeout 5s
|
52
|
-
|
53
|
-
- name: Install k6
|
54
|
-
working-directory: ./k6
|
55
|
-
env:
|
56
|
-
K6_RELEASE_ARTIFACT_URL:
|
57
|
-
https://github.com/grafana/k6/releases/download/v0.37.0/k6-v0.37.0-linux-amd64.tar.gz
|
58
|
-
run: curl "${K6_RELEASE_ARTIFACT_URL}" -L | tar xvz --strip-components 1
|
59
|
-
|
60
|
-
- name: Run Benchmark
|
61
|
-
working-directory: ./k6
|
62
|
-
run: |
|
63
|
-
./k6 \
|
64
|
-
-e GITHUB_PR=${{ github.event.number }} \
|
65
|
-
-e GITHUB_SHA=${{ github.sha }} \
|
66
|
-
-e GITHUB_TOKEN=${{secrets.GH_PA_TOKEN}} \
|
67
|
-
run k6.js
|
data/examples/simple-api/Gemfile
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
graphql-hive (0.3.3)
|
5
|
-
graphql (~> 2.0.9)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
graphql (2.0.9)
|
11
|
-
multi_json (1.15.0)
|
12
|
-
mustermann (1.1.1)
|
13
|
-
ruby2_keywords (~> 0.0.1)
|
14
|
-
nio4r (2.5.8)
|
15
|
-
puma (5.6.4)
|
16
|
-
nio4r (~> 2.0)
|
17
|
-
rack (2.2.3.1)
|
18
|
-
rack-contrib (2.3.0)
|
19
|
-
rack (~> 2.0)
|
20
|
-
rack-protection (2.2.0)
|
21
|
-
rack
|
22
|
-
ruby2_keywords (0.0.5)
|
23
|
-
sinatra (2.2.0)
|
24
|
-
mustermann (~> 1.0)
|
25
|
-
rack (~> 2.2)
|
26
|
-
rack-protection (= 2.2.0)
|
27
|
-
tilt (~> 2.0)
|
28
|
-
sinatra-contrib (2.2.0)
|
29
|
-
multi_json
|
30
|
-
mustermann (~> 1.0)
|
31
|
-
rack-protection (= 2.2.0)
|
32
|
-
sinatra (= 2.2.0)
|
33
|
-
tilt (~> 2.0)
|
34
|
-
tilt (2.0.10)
|
35
|
-
|
36
|
-
PLATFORMS
|
37
|
-
ruby
|
38
|
-
|
39
|
-
DEPENDENCIES
|
40
|
-
graphql
|
41
|
-
graphql-hive!
|
42
|
-
puma
|
43
|
-
rack-contrib
|
44
|
-
sinatra
|
45
|
-
sinatra-contrib
|
46
|
-
|
47
|
-
BUNDLED WITH
|
48
|
-
2.5.15
|
data/examples/simple-api/app.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require "sinatra"
|
2
|
-
require "sinatra/json"
|
3
|
-
require "rack/contrib"
|
4
|
-
|
5
|
-
require_relative "schema"
|
6
|
-
|
7
|
-
# Test query:
|
8
|
-
#
|
9
|
-
# query GetPost($input: [PostInput!]!) {
|
10
|
-
# post(input: $input, test: TEST1) {
|
11
|
-
# title
|
12
|
-
# myId: id
|
13
|
-
# }
|
14
|
-
# }
|
15
|
-
|
16
|
-
class DemoApp < Sinatra::Base
|
17
|
-
use Rack::JSONBodyParser
|
18
|
-
|
19
|
-
post "/graphql" do
|
20
|
-
result = Schema.execute(
|
21
|
-
params["query"],
|
22
|
-
variables: params[:variables],
|
23
|
-
operation_name: params[:operationName],
|
24
|
-
context: {
|
25
|
-
client_name: "GraphQL Client",
|
26
|
-
client_version: "1.0"
|
27
|
-
}
|
28
|
-
)
|
29
|
-
json result
|
30
|
-
end
|
31
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require "graphql"
|
2
|
-
require "graphql-hive"
|
3
|
-
|
4
|
-
module Types
|
5
|
-
class PostType < GraphQL::Schema::Object
|
6
|
-
description "A blog post"
|
7
|
-
field :id, ID, null: false
|
8
|
-
field :title, String, null: false
|
9
|
-
# fields should be queried in camel-case (this will be `truncatedPreview`)
|
10
|
-
field :truncated_preview, String, null: false
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class Types::PostInput < GraphQL::Schema::InputObject
|
15
|
-
description "Query Post arguments"
|
16
|
-
argument :id, ID, required: true
|
17
|
-
end
|
18
|
-
|
19
|
-
class Types::TestEnum < GraphQL::Schema::Enum
|
20
|
-
value "TEST1"
|
21
|
-
value "TEST2"
|
22
|
-
value "TEST3"
|
23
|
-
end
|
24
|
-
|
25
|
-
class QueryType < GraphQL::Schema::Object
|
26
|
-
description "The query root of this schema"
|
27
|
-
|
28
|
-
# First describe the field signature:
|
29
|
-
field :post, Types::PostType, "Find a post by ID" do
|
30
|
-
argument :input, [Types::PostInput]
|
31
|
-
argument :test, Types::TestEnum
|
32
|
-
end
|
33
|
-
|
34
|
-
# Then provide an implementation:
|
35
|
-
def post(input:, test:)
|
36
|
-
{id: 1, title: "GraphQL Hive with `graphql-ruby`",
|
37
|
-
truncated_preview: "Monitor operations, inspect your queries and publish your GraphQL schema with GraphQL Hive"}
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
class Schema < GraphQL::Schema
|
42
|
-
query QueryType
|
43
|
-
|
44
|
-
use(
|
45
|
-
GraphQL::Hive,
|
46
|
-
buffer_size: 2,
|
47
|
-
token: "YOUR_TOKEN",
|
48
|
-
debug: true,
|
49
|
-
reporting: {author: "Charly Poly", commit: "109bb1e748bae21bdfe663c0ffc7e830"},
|
50
|
-
client_info: proc { |context| {name: context[:client_name], version: context[:client_version]} }
|
51
|
-
)
|
52
|
-
end
|
data/k6/README.md
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# k6 (Integration Tests)
|
2
|
-
|
3
|
-
This directory contains integration tests for the k6 project. In
|
4
|
-
summary, this folder does the following:
|
5
|
-
1. Start a ruby server, with hive enabled
|
6
|
-
2. Start a ruby server, with hive disabled
|
7
|
-
3. Start a mock GraphQL Hive `/usage` api
|
8
|
-
4. Run GraphQL Requests against the 2 servers
|
9
|
-
5. Compare the results
|
10
|
-
|
11
|
-
## Prerequisites
|
12
|
-
1. Ruby > 3.0.0
|
13
|
-
2. Node > 14.0.0
|
14
|
-
3. [k6 installed](https://grafana.com/docs/k6/latest/set-up/install-k6/)
|
15
|
-
|
16
|
-
## Running the tests (locally)
|
17
|
-
|
18
|
-
Start the ruby server with HIVE_ENABLED=true
|
19
|
-
```bash
|
20
|
-
cd graphql-api
|
21
|
-
HIVE_ENABLED=true bundle exec puma -t 0:1 -p 9292
|
22
|
-
```
|
23
|
-
|
24
|
-
Start the ruby server with HIVE_ENABLED=false
|
25
|
-
```bash
|
26
|
-
HIVE_ENABLED=false bundle exec puma -t 0:1 -p 9291
|
27
|
-
```
|
28
|
-
|
29
|
-
Start the usage mock server
|
30
|
-
```bash
|
31
|
-
node usage-mock.js
|
32
|
-
```
|
33
|
-
|
34
|
-
Run k6 tests:
|
35
|
-
```bash
|
36
|
-
k6 run k6.js
|
37
|
-
```
|
data/k6/graphql-api/Gemfile
DELETED
data/k6/graphql-api/Gemfile.lock
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
graphql-hive (0.5.0)
|
5
|
-
graphql (>= 2.3, < 3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
base64 (0.2.0)
|
11
|
-
graphql (2.3.7)
|
12
|
-
base64
|
13
|
-
multi_json (1.15.0)
|
14
|
-
mustermann (2.0.2)
|
15
|
-
ruby2_keywords (~> 0.0.1)
|
16
|
-
nio4r (2.7.3)
|
17
|
-
puma (6.4.2)
|
18
|
-
nio4r (~> 2.0)
|
19
|
-
racc (1.8.0)
|
20
|
-
rack (2.2.9)
|
21
|
-
rack-contrib (2.5.0)
|
22
|
-
rack (< 4)
|
23
|
-
rack-protection (2.2.4)
|
24
|
-
rack
|
25
|
-
ruby2_keywords (0.0.5)
|
26
|
-
sinatra (2.2.4)
|
27
|
-
mustermann (~> 2.0)
|
28
|
-
rack (~> 2.2)
|
29
|
-
rack-protection (= 2.2.4)
|
30
|
-
tilt (~> 2.0)
|
31
|
-
sinatra-contrib (2.2.4)
|
32
|
-
multi_json
|
33
|
-
mustermann (~> 2.0)
|
34
|
-
rack-protection (= 2.2.4)
|
35
|
-
sinatra (= 2.2.4)
|
36
|
-
tilt (~> 2.0)
|
37
|
-
tilt (2.4.0)
|
38
|
-
|
39
|
-
PLATFORMS
|
40
|
-
ruby
|
41
|
-
|
42
|
-
DEPENDENCIES
|
43
|
-
graphql (~> 2)
|
44
|
-
graphql-hive!
|
45
|
-
puma (~> 6)
|
46
|
-
racc
|
47
|
-
rack-contrib (~> 2)
|
48
|
-
sinatra (~> 2)
|
49
|
-
sinatra-contrib
|
50
|
-
|
51
|
-
BUNDLED WITH
|
52
|
-
2.5.15
|
data/k6/graphql-api/app.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
require "sinatra"
|
2
|
-
require "sinatra/json"
|
3
|
-
require "rack/contrib"
|
4
|
-
|
5
|
-
require_relative "schema"
|
6
|
-
|
7
|
-
class DemoApp < Sinatra::Base
|
8
|
-
use Rack::JSONBodyParser
|
9
|
-
|
10
|
-
get "/" do
|
11
|
-
status 200
|
12
|
-
end
|
13
|
-
|
14
|
-
post "/graphql" do
|
15
|
-
result = Schema.execute(
|
16
|
-
params["query"],
|
17
|
-
variables: params[:variables],
|
18
|
-
operation_name: params[:operationName],
|
19
|
-
context: {
|
20
|
-
client_name: "GraphQL Client",
|
21
|
-
client_version: "1.0"
|
22
|
-
}
|
23
|
-
)
|
24
|
-
json result
|
25
|
-
end
|
26
|
-
end
|
data/k6/graphql-api/config.ru
DELETED
data/k6/graphql-api/schema.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require "graphql"
|
2
|
-
require "graphql-hive"
|
3
|
-
|
4
|
-
module Types
|
5
|
-
class PostType < GraphQL::Schema::Object
|
6
|
-
description "A blog post"
|
7
|
-
field :id, ID, null: false
|
8
|
-
field :title, String, null: false
|
9
|
-
# fields should be queried in camel-case (this will be `truncatedPreview`)
|
10
|
-
field :truncated_preview, String, null: false
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class QueryType < GraphQL::Schema::Object
|
15
|
-
description "The query root of this schema"
|
16
|
-
|
17
|
-
# First describe the field signature:
|
18
|
-
field :post, Types::PostType, "Find a post by ID" do
|
19
|
-
argument :id, [ID]
|
20
|
-
end
|
21
|
-
|
22
|
-
# Then provide an implementation:
|
23
|
-
def post(id:)
|
24
|
-
{id: 1, title: "GraphQL Hive with `graphql-ruby`",
|
25
|
-
truncated_preview: "Monitor operations, inspect your queries and publish your GraphQL schema with GraphQL Hive"}
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class Schema < GraphQL::Schema
|
30
|
-
query QueryType
|
31
|
-
|
32
|
-
use(
|
33
|
-
GraphQL::Hive,
|
34
|
-
enabled: ENV["HIVE_ENABLED"] === "true",
|
35
|
-
endpoint: "localhost",
|
36
|
-
debug: true,
|
37
|
-
port: 8888,
|
38
|
-
token: "stress-token",
|
39
|
-
report_schema: false
|
40
|
-
)
|
41
|
-
end
|
data/k6/k6.js
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
import { check } from "k6";
|
2
|
-
import http from "k6/http";
|
3
|
-
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.1/index.js";
|
4
|
-
import { githubComment } from "https://raw.githubusercontent.com/dotansimha/k6-github-pr-comment/master/lib.js";
|
5
|
-
|
6
|
-
export const options = {
|
7
|
-
discardResponseBodies: true,
|
8
|
-
scenarios: {
|
9
|
-
hiveEnabled: {
|
10
|
-
executor: "shared-iterations",
|
11
|
-
vus: 120,
|
12
|
-
iterations: 500,
|
13
|
-
maxDuration: "30s",
|
14
|
-
env: { GQL_API_PORT: "9292", HIVE_ENABLED: "true" },
|
15
|
-
},
|
16
|
-
hiveDisabled: {
|
17
|
-
executor: "shared-iterations",
|
18
|
-
vus: 120,
|
19
|
-
iterations: 500,
|
20
|
-
maxDuration: "30s",
|
21
|
-
startTime: "30s",
|
22
|
-
env: { GQL_API_PORT: "9291", HIVE_ENABLED: "false" },
|
23
|
-
},
|
24
|
-
},
|
25
|
-
thresholds: {
|
26
|
-
"http_req_duration{hive:enabled}": ["avg<4500"],
|
27
|
-
"http_req_duration{hive:disabled}": ["avg<4500"],
|
28
|
-
},
|
29
|
-
};
|
30
|
-
|
31
|
-
const QUERY = /* GraphQL */ `
|
32
|
-
query GetPost {
|
33
|
-
post(id: 1) {
|
34
|
-
title
|
35
|
-
myId: id
|
36
|
-
}
|
37
|
-
}
|
38
|
-
`;
|
39
|
-
|
40
|
-
export default function () {
|
41
|
-
const payload = JSON.stringify({
|
42
|
-
query: QUERY,
|
43
|
-
operationName: "GetPost",
|
44
|
-
});
|
45
|
-
const params = {
|
46
|
-
headers: {
|
47
|
-
"Content-Type": "application/json",
|
48
|
-
},
|
49
|
-
tags: { hive: __ENV.HIVE_ENABLED === "true" ? "enabled" : "disabled" },
|
50
|
-
};
|
51
|
-
|
52
|
-
return http.post(
|
53
|
-
`http://localhost:${__ENV.GQL_API_PORT}/graphql`,
|
54
|
-
payload,
|
55
|
-
params
|
56
|
-
);
|
57
|
-
}
|
58
|
-
|
59
|
-
export function handleSummary(data) {
|
60
|
-
let overheadPercentage = null;
|
61
|
-
if (
|
62
|
-
data.metrics["http_req_duration{hive:enabled}"] &&
|
63
|
-
data.metrics["http_req_duration{hive:disabled}"]
|
64
|
-
) {
|
65
|
-
const withHive =
|
66
|
-
data.metrics["http_req_duration{hive:enabled}"].values["avg"];
|
67
|
-
const withoutHive =
|
68
|
-
data.metrics["http_req_duration{hive:disabled}"].values["avg"];
|
69
|
-
overheadPercentage = 100 - (withHive * 100.0) / withoutHive;
|
70
|
-
}
|
71
|
-
if (__ENV.GITHUB_TOKEN) {
|
72
|
-
githubComment(data, {
|
73
|
-
token: __ENV.GITHUB_TOKEN,
|
74
|
-
commit: __ENV.GITHUB_SHA,
|
75
|
-
pr: __ENV.GITHUB_PR,
|
76
|
-
org: "charlypoly",
|
77
|
-
repo: "graphql-ruby-hive",
|
78
|
-
renderTitle: () => {
|
79
|
-
return overheadPercentage < 5
|
80
|
-
? "✅ Benchmark Results"
|
81
|
-
: "❌ Benchmark Failed";
|
82
|
-
},
|
83
|
-
renderMessage: () => {
|
84
|
-
const result = [];
|
85
|
-
if (overheadPercentage > 5) {
|
86
|
-
result.push(
|
87
|
-
"**Performance regression detected**: it seems like your Pull Request adds some extra latency to GraphQL Hive operations processing"
|
88
|
-
);
|
89
|
-
} else {
|
90
|
-
result.push("Overhead <= 1%");
|
91
|
-
}
|
92
|
-
return result.join("\n");
|
93
|
-
},
|
94
|
-
});
|
95
|
-
}
|
96
|
-
return {
|
97
|
-
stdout: textSummary(data, { indent: " ", enableColors: true }),
|
98
|
-
};
|
99
|
-
}
|
data/k6/package.json
DELETED
data/k6/usage-api.js
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
const express = require("express");
|
2
|
-
const app = express();
|
3
|
-
const port = 8888;
|
4
|
-
|
5
|
-
app.use(express.json());
|
6
|
-
|
7
|
-
let count = 0;
|
8
|
-
|
9
|
-
app.get("/", (req, res) => {
|
10
|
-
res.status(200).send({ status: 'ok' })
|
11
|
-
});
|
12
|
-
|
13
|
-
app.get("/count", (req, res) => {
|
14
|
-
res.status(200).send({ count });
|
15
|
-
});
|
16
|
-
|
17
|
-
app.post("/usage", (req, res) => {
|
18
|
-
if (req.body && req.body.operations) {
|
19
|
-
count += Object.keys(req.body.operations).length;
|
20
|
-
}
|
21
|
-
res.status(200).send({ status: "ok " });
|
22
|
-
});
|
23
|
-
|
24
|
-
app.listen(port, () => {
|
25
|
-
console.log(`Usage API listening on port ${port}`);
|
26
|
-
});
|
data/k6/yarn.lock
DELETED
@@ -1,405 +0,0 @@
|
|
1
|
-
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
2
|
-
# yarn lockfile v1
|
3
|
-
|
4
|
-
|
5
|
-
accepts@~1.3.8:
|
6
|
-
version "1.3.8"
|
7
|
-
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
8
|
-
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
|
9
|
-
dependencies:
|
10
|
-
mime-types "~2.1.34"
|
11
|
-
negotiator "0.6.3"
|
12
|
-
|
13
|
-
array-flatten@1.1.1:
|
14
|
-
version "1.1.1"
|
15
|
-
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
|
16
|
-
integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==
|
17
|
-
|
18
|
-
body-parser@1.20.0:
|
19
|
-
version "1.20.0"
|
20
|
-
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5"
|
21
|
-
integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==
|
22
|
-
dependencies:
|
23
|
-
bytes "3.1.2"
|
24
|
-
content-type "~1.0.4"
|
25
|
-
debug "2.6.9"
|
26
|
-
depd "2.0.0"
|
27
|
-
destroy "1.2.0"
|
28
|
-
http-errors "2.0.0"
|
29
|
-
iconv-lite "0.4.24"
|
30
|
-
on-finished "2.4.1"
|
31
|
-
qs "6.10.3"
|
32
|
-
raw-body "2.5.1"
|
33
|
-
type-is "~1.6.18"
|
34
|
-
unpipe "1.0.0"
|
35
|
-
|
36
|
-
bytes@3.1.2:
|
37
|
-
version "3.1.2"
|
38
|
-
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
|
39
|
-
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
|
40
|
-
|
41
|
-
call-bind@^1.0.0:
|
42
|
-
version "1.0.2"
|
43
|
-
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
|
44
|
-
integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==
|
45
|
-
dependencies:
|
46
|
-
function-bind "^1.1.1"
|
47
|
-
get-intrinsic "^1.0.2"
|
48
|
-
|
49
|
-
content-disposition@0.5.4:
|
50
|
-
version "0.5.4"
|
51
|
-
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe"
|
52
|
-
integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==
|
53
|
-
dependencies:
|
54
|
-
safe-buffer "5.2.1"
|
55
|
-
|
56
|
-
content-type@~1.0.4:
|
57
|
-
version "1.0.4"
|
58
|
-
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
|
59
|
-
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
|
60
|
-
|
61
|
-
cookie-signature@1.0.6:
|
62
|
-
version "1.0.6"
|
63
|
-
resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
|
64
|
-
integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==
|
65
|
-
|
66
|
-
cookie@0.5.0:
|
67
|
-
version "0.5.0"
|
68
|
-
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
|
69
|
-
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
|
70
|
-
|
71
|
-
debug@2.6.9:
|
72
|
-
version "2.6.9"
|
73
|
-
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
74
|
-
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
|
75
|
-
dependencies:
|
76
|
-
ms "2.0.0"
|
77
|
-
|
78
|
-
depd@2.0.0:
|
79
|
-
version "2.0.0"
|
80
|
-
resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
|
81
|
-
integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
|
82
|
-
|
83
|
-
destroy@1.2.0:
|
84
|
-
version "1.2.0"
|
85
|
-
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
|
86
|
-
integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==
|
87
|
-
|
88
|
-
ee-first@1.1.1:
|
89
|
-
version "1.1.1"
|
90
|
-
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
91
|
-
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
|
92
|
-
|
93
|
-
encodeurl@~1.0.2:
|
94
|
-
version "1.0.2"
|
95
|
-
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
96
|
-
integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==
|
97
|
-
|
98
|
-
escape-html@~1.0.3:
|
99
|
-
version "1.0.3"
|
100
|
-
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
101
|
-
integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
|
102
|
-
|
103
|
-
etag@~1.8.1:
|
104
|
-
version "1.8.1"
|
105
|
-
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
106
|
-
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
|
107
|
-
|
108
|
-
express@^4.18.1:
|
109
|
-
version "4.18.1"
|
110
|
-
resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf"
|
111
|
-
integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==
|
112
|
-
dependencies:
|
113
|
-
accepts "~1.3.8"
|
114
|
-
array-flatten "1.1.1"
|
115
|
-
body-parser "1.20.0"
|
116
|
-
content-disposition "0.5.4"
|
117
|
-
content-type "~1.0.4"
|
118
|
-
cookie "0.5.0"
|
119
|
-
cookie-signature "1.0.6"
|
120
|
-
debug "2.6.9"
|
121
|
-
depd "2.0.0"
|
122
|
-
encodeurl "~1.0.2"
|
123
|
-
escape-html "~1.0.3"
|
124
|
-
etag "~1.8.1"
|
125
|
-
finalhandler "1.2.0"
|
126
|
-
fresh "0.5.2"
|
127
|
-
http-errors "2.0.0"
|
128
|
-
merge-descriptors "1.0.1"
|
129
|
-
methods "~1.1.2"
|
130
|
-
on-finished "2.4.1"
|
131
|
-
parseurl "~1.3.3"
|
132
|
-
path-to-regexp "0.1.7"
|
133
|
-
proxy-addr "~2.0.7"
|
134
|
-
qs "6.10.3"
|
135
|
-
range-parser "~1.2.1"
|
136
|
-
safe-buffer "5.2.1"
|
137
|
-
send "0.18.0"
|
138
|
-
serve-static "1.15.0"
|
139
|
-
setprototypeof "1.2.0"
|
140
|
-
statuses "2.0.1"
|
141
|
-
type-is "~1.6.18"
|
142
|
-
utils-merge "1.0.1"
|
143
|
-
vary "~1.1.2"
|
144
|
-
|
145
|
-
finalhandler@1.2.0:
|
146
|
-
version "1.2.0"
|
147
|
-
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32"
|
148
|
-
integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==
|
149
|
-
dependencies:
|
150
|
-
debug "2.6.9"
|
151
|
-
encodeurl "~1.0.2"
|
152
|
-
escape-html "~1.0.3"
|
153
|
-
on-finished "2.4.1"
|
154
|
-
parseurl "~1.3.3"
|
155
|
-
statuses "2.0.1"
|
156
|
-
unpipe "~1.0.0"
|
157
|
-
|
158
|
-
forwarded@0.2.0:
|
159
|
-
version "0.2.0"
|
160
|
-
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
|
161
|
-
integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
|
162
|
-
|
163
|
-
fresh@0.5.2:
|
164
|
-
version "0.5.2"
|
165
|
-
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
|
166
|
-
integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
|
167
|
-
|
168
|
-
function-bind@^1.1.1:
|
169
|
-
version "1.1.1"
|
170
|
-
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
171
|
-
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
172
|
-
|
173
|
-
get-intrinsic@^1.0.2:
|
174
|
-
version "1.1.2"
|
175
|
-
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598"
|
176
|
-
integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==
|
177
|
-
dependencies:
|
178
|
-
function-bind "^1.1.1"
|
179
|
-
has "^1.0.3"
|
180
|
-
has-symbols "^1.0.3"
|
181
|
-
|
182
|
-
has-symbols@^1.0.3:
|
183
|
-
version "1.0.3"
|
184
|
-
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
|
185
|
-
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
|
186
|
-
|
187
|
-
has@^1.0.3:
|
188
|
-
version "1.0.3"
|
189
|
-
resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
|
190
|
-
integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
|
191
|
-
dependencies:
|
192
|
-
function-bind "^1.1.1"
|
193
|
-
|
194
|
-
http-errors@2.0.0:
|
195
|
-
version "2.0.0"
|
196
|
-
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
|
197
|
-
integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==
|
198
|
-
dependencies:
|
199
|
-
depd "2.0.0"
|
200
|
-
inherits "2.0.4"
|
201
|
-
setprototypeof "1.2.0"
|
202
|
-
statuses "2.0.1"
|
203
|
-
toidentifier "1.0.1"
|
204
|
-
|
205
|
-
iconv-lite@0.4.24:
|
206
|
-
version "0.4.24"
|
207
|
-
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
208
|
-
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
209
|
-
dependencies:
|
210
|
-
safer-buffer ">= 2.1.2 < 3"
|
211
|
-
|
212
|
-
inherits@2.0.4:
|
213
|
-
version "2.0.4"
|
214
|
-
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
215
|
-
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
216
|
-
|
217
|
-
ipaddr.js@1.9.1:
|
218
|
-
version "1.9.1"
|
219
|
-
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
|
220
|
-
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
|
221
|
-
|
222
|
-
media-typer@0.3.0:
|
223
|
-
version "0.3.0"
|
224
|
-
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
225
|
-
integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==
|
226
|
-
|
227
|
-
merge-descriptors@1.0.1:
|
228
|
-
version "1.0.1"
|
229
|
-
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
|
230
|
-
integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==
|
231
|
-
|
232
|
-
methods@~1.1.2:
|
233
|
-
version "1.1.2"
|
234
|
-
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
235
|
-
integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==
|
236
|
-
|
237
|
-
mime-db@1.52.0:
|
238
|
-
version "1.52.0"
|
239
|
-
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
|
240
|
-
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
|
241
|
-
|
242
|
-
mime-types@~2.1.24, mime-types@~2.1.34:
|
243
|
-
version "2.1.35"
|
244
|
-
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
|
245
|
-
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
|
246
|
-
dependencies:
|
247
|
-
mime-db "1.52.0"
|
248
|
-
|
249
|
-
mime@1.6.0:
|
250
|
-
version "1.6.0"
|
251
|
-
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
|
252
|
-
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
|
253
|
-
|
254
|
-
ms@2.0.0:
|
255
|
-
version "2.0.0"
|
256
|
-
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
257
|
-
integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
|
258
|
-
|
259
|
-
ms@2.1.3:
|
260
|
-
version "2.1.3"
|
261
|
-
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
262
|
-
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
263
|
-
|
264
|
-
negotiator@0.6.3:
|
265
|
-
version "0.6.3"
|
266
|
-
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
267
|
-
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
268
|
-
|
269
|
-
object-inspect@^1.9.0:
|
270
|
-
version "1.12.2"
|
271
|
-
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
272
|
-
integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
|
273
|
-
|
274
|
-
on-finished@2.4.1:
|
275
|
-
version "2.4.1"
|
276
|
-
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
|
277
|
-
integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
|
278
|
-
dependencies:
|
279
|
-
ee-first "1.1.1"
|
280
|
-
|
281
|
-
parseurl@~1.3.3:
|
282
|
-
version "1.3.3"
|
283
|
-
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
|
284
|
-
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
|
285
|
-
|
286
|
-
path-to-regexp@0.1.7:
|
287
|
-
version "0.1.7"
|
288
|
-
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
|
289
|
-
integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==
|
290
|
-
|
291
|
-
proxy-addr@~2.0.7:
|
292
|
-
version "2.0.7"
|
293
|
-
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"
|
294
|
-
integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==
|
295
|
-
dependencies:
|
296
|
-
forwarded "0.2.0"
|
297
|
-
ipaddr.js "1.9.1"
|
298
|
-
|
299
|
-
qs@6.10.3:
|
300
|
-
version "6.10.3"
|
301
|
-
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e"
|
302
|
-
integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==
|
303
|
-
dependencies:
|
304
|
-
side-channel "^1.0.4"
|
305
|
-
|
306
|
-
range-parser@~1.2.1:
|
307
|
-
version "1.2.1"
|
308
|
-
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
309
|
-
integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
310
|
-
|
311
|
-
raw-body@2.5.1:
|
312
|
-
version "2.5.1"
|
313
|
-
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857"
|
314
|
-
integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==
|
315
|
-
dependencies:
|
316
|
-
bytes "3.1.2"
|
317
|
-
http-errors "2.0.0"
|
318
|
-
iconv-lite "0.4.24"
|
319
|
-
unpipe "1.0.0"
|
320
|
-
|
321
|
-
safe-buffer@5.2.1:
|
322
|
-
version "5.2.1"
|
323
|
-
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
324
|
-
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
325
|
-
|
326
|
-
"safer-buffer@>= 2.1.2 < 3":
|
327
|
-
version "2.1.2"
|
328
|
-
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
329
|
-
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
330
|
-
|
331
|
-
send@0.18.0:
|
332
|
-
version "0.18.0"
|
333
|
-
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
|
334
|
-
integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==
|
335
|
-
dependencies:
|
336
|
-
debug "2.6.9"
|
337
|
-
depd "2.0.0"
|
338
|
-
destroy "1.2.0"
|
339
|
-
encodeurl "~1.0.2"
|
340
|
-
escape-html "~1.0.3"
|
341
|
-
etag "~1.8.1"
|
342
|
-
fresh "0.5.2"
|
343
|
-
http-errors "2.0.0"
|
344
|
-
mime "1.6.0"
|
345
|
-
ms "2.1.3"
|
346
|
-
on-finished "2.4.1"
|
347
|
-
range-parser "~1.2.1"
|
348
|
-
statuses "2.0.1"
|
349
|
-
|
350
|
-
serve-static@1.15.0:
|
351
|
-
version "1.15.0"
|
352
|
-
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"
|
353
|
-
integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
|
354
|
-
dependencies:
|
355
|
-
encodeurl "~1.0.2"
|
356
|
-
escape-html "~1.0.3"
|
357
|
-
parseurl "~1.3.3"
|
358
|
-
send "0.18.0"
|
359
|
-
|
360
|
-
setprototypeof@1.2.0:
|
361
|
-
version "1.2.0"
|
362
|
-
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
|
363
|
-
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
|
364
|
-
|
365
|
-
side-channel@^1.0.4:
|
366
|
-
version "1.0.4"
|
367
|
-
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
368
|
-
integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==
|
369
|
-
dependencies:
|
370
|
-
call-bind "^1.0.0"
|
371
|
-
get-intrinsic "^1.0.2"
|
372
|
-
object-inspect "^1.9.0"
|
373
|
-
|
374
|
-
statuses@2.0.1:
|
375
|
-
version "2.0.1"
|
376
|
-
resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"
|
377
|
-
integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
|
378
|
-
|
379
|
-
toidentifier@1.0.1:
|
380
|
-
version "1.0.1"
|
381
|
-
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
|
382
|
-
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
|
383
|
-
|
384
|
-
type-is@~1.6.18:
|
385
|
-
version "1.6.18"
|
386
|
-
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
|
387
|
-
integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
|
388
|
-
dependencies:
|
389
|
-
media-typer "0.3.0"
|
390
|
-
mime-types "~2.1.24"
|
391
|
-
|
392
|
-
unpipe@1.0.0, unpipe@~1.0.0:
|
393
|
-
version "1.0.0"
|
394
|
-
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
395
|
-
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
|
396
|
-
|
397
|
-
utils-merge@1.0.1:
|
398
|
-
version "1.0.1"
|
399
|
-
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
|
400
|
-
integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==
|
401
|
-
|
402
|
-
vary@~1.1.2:
|
403
|
-
version "1.1.2"
|
404
|
-
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
405
|
-
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module GraphQL
|
2
|
-
class Hive < GraphQL::Tracing::PlatformTracing
|
3
|
-
# BoundedQueue is being used so that the queue does not grow indefinitely
|
4
|
-
# We do not use `SizedQueue` because it blocks the thread when the queue is full with a .wait call
|
5
|
-
# This would go against us not impacting the application performance with the usage reporter
|
6
|
-
class BoundedQueue < Thread::Queue
|
7
|
-
def initialize(bound:, logger:)
|
8
|
-
@bound = bound
|
9
|
-
@logger = logger
|
10
|
-
@lock = Mutex.new
|
11
|
-
|
12
|
-
super()
|
13
|
-
end
|
14
|
-
|
15
|
-
def push(item)
|
16
|
-
@lock.synchronize do
|
17
|
-
if size >= @bound
|
18
|
-
@logger.error("BoundedQueue is full, discarding operation")
|
19
|
-
return
|
20
|
-
end
|
21
|
-
super
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|