graphiti_gql 0.2.24 → 0.2.25

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: 696f200f2ac54b136b21b4b8f237cddfddf742d73da51b73c2513dbb7c0cc60a
4
- data.tar.gz: 914867efbf89a58b33de2e28b65c253577852cedf146e8f2050e2330d9534cdf
3
+ metadata.gz: ae5d9ce0fe34ef8d53204f8c292b5d09cb58c821ec413804a169e3a562061ad2
4
+ data.tar.gz: 02fc540e3203efe6311fba2d30c3b8b75308103cffe4b5df1f01b29dac804e74
5
5
  SHA512:
6
- metadata.gz: cfa86ca259696ca32ba303b5bf4abb8064c7d60b179ef106a136da1a292d0721ec81a12242d9a0ba993c69dae93c0367350354475b13132aead992380bf129af
7
- data.tar.gz: 56a9db45d32242003eb8a9e9cb74f6efc96c92f9889abc93c8b038f6e07a3d5dbe836bfd84d4c4e053d3ff46bfbacf5676408ba95c10b357463a5e6034ac51c2
6
+ metadata.gz: e01483c436cbc15cb0c80598725a16440ba0254242554c9a2401c4dd72ca5cd4b847941fe3d02da7a4d023640b7ca20824e2537a04654dc2d46c192e53885863
7
+ data.tar.gz: 13478f1634bcb76c13cf9aef90c036fb5636a55c72643db21e854cca9679c4c735e848c6245e73d2194374fa54ee34eecda4cc17240f5cbe491acf14a0ef9db9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphiti_gql (0.2.23)
4
+ graphiti_gql (0.2.25)
5
5
  activemodel (> 6.0, < 8.0)
6
6
  graphiti (~> 1.3.9)
7
7
  graphql (~> 2.0)
@@ -21,9 +21,9 @@ GEM
21
21
  coderay (1.1.3)
22
22
  concurrent-ruby (1.1.10)
23
23
  diff-lcs (1.5.0)
24
- dry-container (0.10.0)
24
+ dry-container (0.10.1)
25
25
  concurrent-ruby (~> 1.0)
26
- dry-core (0.8.0)
26
+ dry-core (0.8.1)
27
27
  concurrent-ruby (~> 1.0)
28
28
  dry-inflector (0.3.0)
29
29
  dry-logic (1.2.0)
@@ -88,7 +88,14 @@ module GraphitiGql
88
88
  end
89
89
 
90
90
  def filter(name, *args, &blk)
91
+ is_bool = (filters[name] && filters[name][:type] == :boolean) ||
92
+ args[0] == :boolean
93
+ opts = args.length == 1 ? args[0] : args[1]
94
+ boolean_array = is_bool && opts[:single] == false
91
95
  super
96
+ # default behavior is to force single: true
97
+ filters[name][:single] = false if boolean_array
98
+
92
99
  opts = args.extract_options!
93
100
  if opts[:if]
94
101
  attributes[name][:filterable] = opts[:if]
@@ -36,7 +36,7 @@ module GraphitiGql
36
36
  integer: Integer,
37
37
  big_integer: GraphQL::Types::BigInt,
38
38
  float: Float,
39
- boolean: GraphQL::Schema::Member::GraphQLTypeNames::Boolean,
39
+ boolean: GraphQL::Types::Boolean,
40
40
  date: GraphQL::Types::ISO8601Date,
41
41
  datetime: GraphQL::Types::ISO8601DateTime,
42
42
  precise_datetime: PreciseDatetime,
@@ -1,3 +1,3 @@
1
1
  module GraphitiGql
2
- VERSION = "0.2.24"
2
+ VERSION = "0.2.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti_gql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.24
4
+ version: 0.2.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2022-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql