graphql-models_connect 1.1.0 → 1.1.1

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: d4ca2f8e411e9bc8dc957d4a5572eb672d34b2d1d4a53cee64d247da720026e0
4
- data.tar.gz: 4fdf99d8d66d3ae42c9bba5c7ed437f8cf0d2fe6f10b9adc6d6ded6e5cbeff6a
3
+ metadata.gz: 9dfa2989d064ad1818212ca820d0fcd6a11f6b46ad3f085b2a374e4d7ac989c8
4
+ data.tar.gz: b321905a5077e7430016a017d65ffc8e7e993db57260d44ee2d6e64a7db3b146
5
5
  SHA512:
6
- metadata.gz: 62458c968b1103ccb50ead589f6639f50c6f501d273ca0a83dfe1e849bff3149ea796cdd5165f43bfaef93d3f78a6a02a3e5ad2338e51be750c5d6579e14ed82
7
- data.tar.gz: f629f4392a2fcd64c1dd97ea841318ec3245e0f1b583cbebdb510c3a0c50ed8e5386c994ff2b90117d501515e4e93c1cfb6bedf2c269247620a60bb754394057
6
+ metadata.gz: 98821ddcb3874207488965fac1a11d1e639b3d8a35bf31ab76f84e1d244990d7b156b0c271a68b78a988913387c462b137d40a701bab97dcceb6e3a262df0b17
7
+ data.tar.gz: 8814a689a9c837256d723403c4ef301f7af33662a421efbced5b65b6340ea759b2677d1f93a4903a2f499f0fd96b34ccbf3352ed110c42227051b08c1c55569b
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@
8
8
  ### Bug fixes
9
9
  )-->
10
10
 
11
+ ## 1.1.1 2025-05-16
12
+
13
+ ### Bug fixes
14
+
15
+ - Using `definition_methods` broke something in newer versions of the `graphql` gem. We now use `ActiveSupport::Concern`.
16
+
11
17
  ## 1.1.0 2025-04-14
12
18
 
13
19
  ### New features
@@ -1,25 +1,27 @@
1
- module GraphQL
2
- class Schema
3
- module Interface
4
- definition_methods do
5
- def model_class new_model_class=nil
6
- if new_model_class.nil?
7
- @model_class ||= default_model_class
8
- else
9
- @model_class = new_model_class
10
- end
11
- end
1
+ require 'active_support/concern'
12
2
 
13
- def default_model_class
14
- raise 'You must set an explicit model for anonymous graphql interfaces' if name.nil?
3
+ monkey_patch = Module.new do
4
+ extend ActiveSupport::Concern
15
5
 
16
- default_model_name = name.delete_suffix 'Type'
6
+ class_methods do
7
+ def model_class new_model_class=nil
8
+ if new_model_class.nil?
9
+ @model_class ||= default_model_class
10
+ else
11
+ @model_class = new_model_class
12
+ end
13
+ end
17
14
 
18
- raise "No default model found for #{name}" unless const_defined? default_model_name
15
+ def default_model_class
16
+ raise 'You must set an explicit model for anonymous graphql interfaces' if name.nil?
19
17
 
20
- const_get default_model_name
21
- end
22
- end
18
+ default_model_name = name.delete_suffix 'Type'
19
+
20
+ raise "No default model found for #{name}" unless const_defined? default_model_name
21
+
22
+ const_get default_model_name
23
23
  end
24
24
  end
25
25
  end
26
+
27
+ GraphQL::Schema::Interface.prepend monkey_patch
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module ModelsConnect
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-models_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moku S.r.l.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-04-14 00:00:00.000000000 Z
12
+ date: 2025-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport