cm-graphql 0.0.14 → 0.0.15
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/graphql/cm_graphql/extensions/recaptcha_extension.rb +13 -1
- data/cm-graphql.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06a18f43504bd82ccee7b688a45858192cb6e4afb6de4dbcf27612198c51dd1c
|
|
4
|
+
data.tar.gz: ca9d3bcf4d349685bb75be78814b198ffa8e55de05aa1862a390c8d46795f10f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df04d89ff2eff7b08a4859ae072b9ff7cb0ca221f78281c9caa54cac059225e8c9f3cd78eec0a05aa45146f7e4886d841274c0f4a4a6f2a26045df99b4117079
|
|
7
|
+
data.tar.gz: 69032206c0a0fe00dd677299a4f6965da4e958d408e8a69e75f3f24069043d3af38b1538685cc85c12f3ef6feab4a9de88ff73b724ba28c80e7847e35fd12909
|
data/Gemfile.lock
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
module CmGraphql
|
|
2
2
|
module Extensions
|
|
3
3
|
class RecaptchaExtension < GraphQL::Schema::FieldExtension
|
|
4
|
+
|
|
5
|
+
# Wrapper to satisfy RelayClassicMutation's to_kwargs expectation
|
|
6
|
+
InputWrapper = Struct.new(:data) do
|
|
7
|
+
def to_kwargs
|
|
8
|
+
data
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def to_h
|
|
12
|
+
data
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
4
16
|
def apply
|
|
5
17
|
input_arg = field.arguments["input"]
|
|
6
18
|
input_type = input_arg.type.unwrap
|
|
@@ -19,7 +31,7 @@ module CmGraphql
|
|
|
19
31
|
minimum_score: options[:minimum_score] || RECAPTCHA_MINIMUM_SCORE
|
|
20
32
|
)
|
|
21
33
|
|
|
22
|
-
next_input = input_hash.except(:recaptcha_token)
|
|
34
|
+
next_input = InputWrapper.new(input_hash.except(:recaptcha_token))
|
|
23
35
|
yield(object, args_hash.except(:input).merge(input: next_input), nil)
|
|
24
36
|
end
|
|
25
37
|
end
|
data/cm-graphql.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = 'cm-graphql'
|
|
5
|
-
spec.version = '0.0.
|
|
5
|
+
spec.version = '0.0.15'
|
|
6
6
|
spec.date = '2022-09-14'
|
|
7
7
|
spec.summary = 'A gem to setup grapqhl basics like pagination, file upload'
|
|
8
8
|
spec.description = 'A gem to setup grapqhl basics like pagination, file upload'
|