graphql-models_connect 1.1.1 → 1.1.2

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: 9dfa2989d064ad1818212ca820d0fcd6a11f6b46ad3f085b2a374e4d7ac989c8
4
- data.tar.gz: b321905a5077e7430016a017d65ffc8e7e993db57260d44ee2d6e64a7db3b146
3
+ metadata.gz: 0cb97fc4846f4eb233fac17686332a39b30e552e332877f5054cd14194d7f28a
4
+ data.tar.gz: e5452a783b34ac3ab8840cdd7f3168e44867146f8a7ec55087d018dc9ed3ac31
5
5
  SHA512:
6
- metadata.gz: 98821ddcb3874207488965fac1a11d1e639b3d8a35bf31ab76f84e1d244990d7b156b0c271a68b78a988913387c462b137d40a701bab97dcceb6e3a262df0b17
7
- data.tar.gz: 8814a689a9c837256d723403c4ef301f7af33662a421efbced5b65b6340ea759b2677d1f93a4903a2f499f0fd96b34ccbf3352ed110c42227051b08c1c55569b
6
+ metadata.gz: 1298138789be3639700ffa08b6e203bdb48547fb83eeab4ade3f7beb70a7fda9ab45173f544e2697a478ae86ca857c4c456f152f1f62c7616eba8235ce122161
7
+ data.tar.gz: 41683e4471d8786880700eb091794af32b05b5eebed840b65edf6f4d50fa4bd7bb8c6414af39e07275ddb334b75fc5eecf0f93d0c85166c2e26b3f750715935b
data/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@
8
8
  ### Bug fixes
9
9
  )-->
10
10
 
11
+ ## 1.1.2 2025-08-18
12
+
13
+ ### Bug fixes
14
+
15
+ - Using `class_methods` wasn't compatible with the inheritance mechanism of interfaces. Adding the methods to `DefinitionMethods` directly actually makes them available to interfaces as intended.
16
+
11
17
  ## 1.1.1 2025-05-16
12
18
 
13
19
  ### Bug fixes
@@ -1,27 +1,23 @@
1
1
  require 'active_support/concern'
2
2
 
3
3
  monkey_patch = Module.new do
4
- extend ActiveSupport::Concern
5
-
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
4
+ def model_class new_model_class=nil
5
+ if new_model_class.nil?
6
+ @model_class ||= default_model_class
7
+ else
8
+ @model_class = new_model_class
13
9
  end
10
+ end
14
11
 
15
- def default_model_class
16
- raise 'You must set an explicit model for anonymous graphql interfaces' if name.nil?
12
+ def default_model_class
13
+ raise 'You must set an explicit model for anonymous graphql interfaces' if name.nil?
17
14
 
18
- default_model_name = name.delete_suffix 'Type'
15
+ default_model_name = name.delete_suffix 'Type'
19
16
 
20
- raise "No default model found for #{name}" unless const_defined? default_model_name
17
+ raise "No default model found for #{name}" unless const_defined? default_model_name
21
18
 
22
- const_get default_model_name
23
- end
19
+ const_get default_model_name
24
20
  end
25
21
  end
26
22
 
27
- GraphQL::Schema::Interface.prepend monkey_patch
23
+ GraphQL::Schema::Interface::DefinitionMethods.include monkey_patch
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module ModelsConnect
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.2'
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.1
4
+ version: 1.1.2
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-05-16 00:00:00.000000000 Z
12
+ date: 2025-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport