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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fb063cadbfd8e490a701b23d0a6fe7efbce9712
4
- data.tar.gz: e2eb380c40825945afb4a889433eab7bcea5fa8e
3
+ metadata.gz: 0a20470cd242699dce47fce569d283f095b499f8
4
+ data.tar.gz: 7f2fb10b9925916622904d15baf60bc2cc024b02
5
5
  SHA512:
6
- metadata.gz: ed5fc3820e397f25bda5a5687e82633e9c4f62bf9b23180628fd36db0794f777b37fd8b803b2ed8c5d1b9d0efbeed075eaf36c76e1e204c6a7e7b122881ec12a
7
- data.tar.gz: 69e3fc34c0ce52277808a513085d97ab25a4a08239a9c304eec7832e2a91c8dde2aa6d6ee3d6c753593bd68985297012317ac9a3c48297f271b4e9f2bf165b95
6
+ metadata.gz: 2bae1bb2eb29bf4c372bac20fb90257d7ebba0b1433ad1886f2b9f48892f8a7500f924b0c158fb4168c4084106e1697290d356abe60275558614e902794f8251
7
+ data.tar.gz: 8b59a8e978c63434d611dfe792697c9bfb8a8d88404b0308f66f77cf69b8196a01876cc32f1276fe0e7774ff8ff08e6a19837c10a9ded6daaa866f0823a5ebb1
@@ -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.3...HEAD
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
 
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Sugar
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
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.3
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: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler