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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f96a2b69bc022c0d1c34f17f3446eeb9e568675a3311085850673299f538dc5d
4
- data.tar.gz: 1312ee2a215b9bf4a3f8506105c41dd9a05f66b70624bbaf5f9a74aab2366030
3
+ metadata.gz: 06a18f43504bd82ccee7b688a45858192cb6e4afb6de4dbcf27612198c51dd1c
4
+ data.tar.gz: ca9d3bcf4d349685bb75be78814b198ffa8e55de05aa1862a390c8d46795f10f
5
5
  SHA512:
6
- metadata.gz: 3934404241a4ddb217799a54dee2da3c019941a1ee61c3313391e9cd768d836bd46d382cc01fa95b673ef12f5554a8e5cc37460f604f15e8eea52fad7c132035
7
- data.tar.gz: 3e564a39769a51646162853f7ad72c7331ea86f5a079450480a1e168ceee4276c1d91aa68f1cb41cfe2dfb704af1a96f266c6ec20864ee2e25aba97ad4f6c1aa
6
+ metadata.gz: df04d89ff2eff7b08a4859ae072b9ff7cb0ca221f78281c9caa54cac059225e8c9f3cd78eec0a05aa45146f7e4886d841274c0f4a4a6f2a26045df99b4117079
7
+ data.tar.gz: 69032206c0a0fe00dd677299a4f6965da4e958d408e8a69e75f3f24069043d3af38b1538685cc85c12f3ef6feab4a9de88ff73b724ba28c80e7847e35fd12909
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-graphql (0.0.14)
4
+ cm-graphql (0.0.15)
5
5
  graphiql-rails (>= 1.9)
6
6
  graphql (>= 2.2.5)
7
7
  graphql-rails_logger (>= 1.2.4)
@@ -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.14'
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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cm-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anbazhagan Palani