graphql-sugar 0.1.3 → 0.1.4
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 -1
- data/lib/graphql/sugar/define/relationship.rb +4 -2
- data/lib/graphql/sugar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a20470cd242699dce47fce569d283f095b499f8
|
4
|
+
data.tar.gz: 7f2fb10b9925916622904d15baf60bc2cc024b02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bae1bb2eb29bf4c372bac20fb90257d7ebba0b1433ad1886f2b9f48892f8a7500f924b0c158fb4168c4084106e1697290d356abe60275558614e902794f8251
|
7
|
+
data.tar.gz: 8b59a8e978c63434d611dfe792697c9bfb8a8d88404b0308f66f77cf69b8196a01876cc32f1276fe0e7774ff8ff08e6a19837c10a9ded6daaa866f0823a5ebb1
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.1.4] - 2018-01-26
|
10
|
+
### Fixed
|
11
|
+
- Fix has_many through relationships (#2)
|
12
|
+
|
9
13
|
## [0.1.3] - 2017-12-12
|
10
14
|
### Fixed
|
11
15
|
- Fix has_one relationship (#1)
|
@@ -25,7 +29,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
25
29
|
### Added
|
26
30
|
- First release of this gem
|
27
31
|
|
28
|
-
[Unreleased]: https://github.com/keepworks/graphql-sugar/compare/v0.1.
|
32
|
+
[Unreleased]: https://github.com/keepworks/graphql-sugar/compare/v0.1.4...HEAD
|
33
|
+
[0.1.3]: https://github.com/keepworks/graphql-sugar/compare/v0.1.3...v0.1.4
|
29
34
|
[0.1.3]: https://github.com/keepworks/graphql-sugar/compare/v0.1.2...v0.1.3
|
30
35
|
[0.1.2]: https://github.com/keepworks/graphql-sugar/compare/v0.1.1...v0.1.2
|
31
36
|
[0.1.1]: https://github.com/keepworks/graphql-sugar/compare/v0.1.0...v0.1.1
|
@@ -10,7 +10,8 @@ module GraphQL
|
|
10
10
|
if association.association_class == ActiveRecord::Associations::BelongsToAssociation
|
11
11
|
define_belongs_to(type_defn, field_name, model_class, association_name, association)
|
12
12
|
elsif association.association_class == ActiveRecord::Associations::HasOneAssociation ||
|
13
|
-
association.association_class == ActiveRecord::Associations::HasManyAssociation
|
13
|
+
association.association_class == ActiveRecord::Associations::HasManyAssociation ||
|
14
|
+
association.association_class == ActiveRecord::Associations::HasManyThroughAssociation
|
14
15
|
define_has_one_or_many(type_defn, field_name, model_class, association_name, association)
|
15
16
|
end
|
16
17
|
end
|
@@ -40,7 +41,8 @@ module GraphQL
|
|
40
41
|
|
41
42
|
kwargs[:type] = "Types::#{association.klass}Type".constantize
|
42
43
|
|
43
|
-
if association.association_class == ActiveRecord::Associations::HasManyAssociation
|
44
|
+
if association.association_class == ActiveRecord::Associations::HasManyAssociation ||
|
45
|
+
association.association_class == ActiveRecord::Associations::HasManyThroughAssociation
|
44
46
|
kwargs[:type] = kwargs[:type].to_non_null_type.to_list_type
|
45
47
|
end
|
46
48
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-sugar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pradeep Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|