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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/graphql/models_connect/dsl/graphql/schema/interface.rb +12 -16
- data/lib/graphql/models_connect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cb97fc4846f4eb233fac17686332a39b30e552e332877f5054cd14194d7f28a
|
4
|
+
data.tar.gz: e5452a783b34ac3ab8840cdd7f3168e44867146f8a7ec55087d018dc9ed3ac31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
-
|
16
|
-
|
12
|
+
def default_model_class
|
13
|
+
raise 'You must set an explicit model for anonymous graphql interfaces' if name.nil?
|
17
14
|
|
18
|
-
|
15
|
+
default_model_name = name.delete_suffix 'Type'
|
19
16
|
|
20
|
-
|
17
|
+
raise "No default model found for #{name}" unless const_defined? default_model_name
|
21
18
|
|
22
|
-
|
23
|
-
end
|
19
|
+
const_get default_model_name
|
24
20
|
end
|
25
21
|
end
|
26
22
|
|
27
|
-
GraphQL::Schema::Interface.
|
23
|
+
GraphQL::Schema::Interface::DefinitionMethods.include monkey_patch
|
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.
|
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-
|
12
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|