graphql-filters 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ea0487a315eba7379064803399873439f3c0f8d4f4834a036018d393b85338a
4
- data.tar.gz: 0c304de0494022456ea6cd65b893390c0b57ea6033852c8b676af92d7d5f1ad2
3
+ metadata.gz: cc4c3d2727cdf9d6767658acca81bed6a8b9d56aa129050fbdd84d69a0ab4454
4
+ data.tar.gz: 9d76544c44e8890950caf45a390f078b1af0c2f0f5a689f0535b07e230e6a63b
5
5
  SHA512:
6
- metadata.gz: 77cdc50f80b142628f1b66ba80ac6db8c5d9f86f477f5ec9ebff3ede53b0ad3bba58cb850774c7f9573e964a172aef35f532dc3880efa73631fed897222dd6ce
7
- data.tar.gz: bed2892de9d4ce4c7c5a3e0c5c121624eac2a56d1870e879b45048af57e07a36acc34771936056e806baf629b2b4132149e059ab427d9c70931cd52ecbaaa4a7
6
+ metadata.gz: e44a35f54fa1dbc70bde801e3c13c22dde64324ab17dcd24335529f35236a0269df551f0f24a41fa75c64227bc6d2b690c4e899ed11586a0ec748b2324fe7540
7
+ data.tar.gz: f036f44b1124d4b692bcd7e29f8b43b0ead9d5e6bdfe997e69a2a90dbf63ecd06ed68980a93167b82dd2b5dce48a904469501c78fd401fe791e83a23e171945d
data/CHANGELOG.md CHANGED
@@ -1,12 +1,25 @@
1
1
  # Changelog
2
2
 
3
- [//]: # (
3
+ <!--[//]: # (
4
4
  ## <Release number> <Date YYYY-MM-DD>
5
5
  ### Breaking changes
6
6
  ### Deprecations
7
7
  ### New features
8
8
  ### Bug fixes
9
- )
9
+ )-->
10
+
11
+ ## 1.0.3 2024-10-09
12
+
13
+ ### Bug fixes
14
+
15
+ - Made dependency to Rails more lax
16
+ - Extracted the pairing of models and GraphQL types into [a separate gem](https://github.com/moku-io/graphql-models_connect)
17
+
18
+ ## 1.0.2 2023-07-24
19
+
20
+ ### Bug fixes
21
+
22
+ - Fixed constant false conditions
10
23
 
11
24
  ## 1.0.1 2023-03-15
12
25
 
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Moku S.r.l., Riccardo Agatea
3
+ Copyright (c) 2023-2024 Moku S.r.l., Riccardo Agatea
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,7 +19,7 @@ module GraphQL
19
19
  if value
20
20
  scope.all
21
21
  else
22
- scope.where false
22
+ scope.none
23
23
  end
24
24
  }
25
25
  }
@@ -17,7 +17,7 @@ module GraphQL
17
17
  if value
18
18
  scope.all
19
19
  else
20
- scope.where false
20
+ scope.none
21
21
  end
22
22
  }
23
23
  }
@@ -26,7 +26,7 @@ module GraphQL
26
26
  if value
27
27
  scope.all
28
28
  else
29
- scope.where false
29
+ scope.none
30
30
  end
31
31
  }
32
32
  }
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Filters
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.3'.freeze
4
4
  end
5
5
  end
@@ -1,6 +1,7 @@
1
1
  require 'active_support/configurable'
2
2
  require 'active_support/core_ext/module/delegation'
3
3
  require 'graphql'
4
+ require 'models_connect'
4
5
  require_relative 'filters/version'
5
6
  require_relative 'filters/utility/cached_class'
6
7
 
@@ -20,7 +21,6 @@ end
20
21
 
21
22
  # These need to be here, after the definition of GraphQL::Filters
22
23
 
23
- require_relative 'models_connect'
24
24
  require_relative 'filters/activerecord_patch'
25
25
  require_relative 'filters/dsl'
26
26
  require_relative 'filters/filterable'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-filters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moku S.r.l.
@@ -9,36 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-03-15 00:00:00.000000000 Z
12
+ date: 2024-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 7.0.0
20
+ version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 7.0.0
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: activesupport
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 7.0.0
34
+ version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 7.0.0
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: graphql
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: 2.0.0
56
+ - !ruby/object:Gem::Dependency
57
+ name: graphql-models_connect
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
56
70
  description: Provide a fully typed interface to filter lists in a GraphQL API.
57
71
  email:
58
72
  - info@moku.io
@@ -64,7 +78,6 @@ files:
64
78
  - ".rubocop.yml"
65
79
  - CHANGELOG.md
66
80
  - Gemfile
67
- - Gemfile.lock
68
81
  - LICENSE
69
82
  - README.md
70
83
  - Rakefile
@@ -94,16 +107,13 @@ files:
94
107
  - lib/graphql/filters/input_types/string_comparison_input_type.rb
95
108
  - lib/graphql/filters/utility/cached_class.rb
96
109
  - lib/graphql/filters/version.rb
97
- - lib/graphql/models_connect.rb
98
- - lib/graphql/models_connect/dsl.rb
99
- - lib/graphql/models_connect/dsl/graphql/schema/object.rb
100
110
  homepage: https://github.com/moku-io/graphql-filters
101
111
  licenses:
102
112
  - MIT
103
113
  metadata:
104
114
  homepage_uri: https://github.com/moku-io/graphql-filters
105
115
  source_code_uri: https://github.com/moku-io/graphql-filters
106
- changelog_uri: https://github.com/moku-io/graphql-filters
116
+ changelog_uri: https://github.com/moku-io/graphql-filters/blob/master/CHANGELOG.md
107
117
  post_install_message:
108
118
  rdoc_options: []
109
119
  require_paths:
@@ -119,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
129
  - !ruby/object:Gem::Version
120
130
  version: '0'
121
131
  requirements: []
122
- rubygems_version: 3.3.3
132
+ rubygems_version: 3.5.20
123
133
  signing_key:
124
134
  specification_version: 4
125
135
  summary: Provide a fully typed interface to filter lists in a GraphQL API.
data/Gemfile.lock DELETED
@@ -1,77 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- graphql-filters (1.0.1)
5
- activerecord (~> 7.0.0)
6
- activesupport (~> 7.0.0)
7
- graphql (~> 2.0.0)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- activemodel (7.0.4.2)
13
- activesupport (= 7.0.4.2)
14
- activerecord (7.0.4.2)
15
- activemodel (= 7.0.4.2)
16
- activesupport (= 7.0.4.2)
17
- activesupport (7.0.4.2)
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
19
- i18n (>= 1.6, < 2)
20
- minitest (>= 5.1)
21
- tzinfo (~> 2.0)
22
- ast (2.4.2)
23
- concurrent-ruby (1.2.2)
24
- diff-lcs (1.5.0)
25
- graphql (2.0.17)
26
- i18n (1.12.0)
27
- concurrent-ruby (~> 1.0)
28
- json (2.6.3)
29
- minitest (5.18.0)
30
- parallel (1.22.1)
31
- parser (3.2.0.0)
32
- ast (~> 2.4.1)
33
- rainbow (3.1.1)
34
- rake (13.0.6)
35
- regexp_parser (2.6.2)
36
- rexml (3.2.5)
37
- rspec (3.12.0)
38
- rspec-core (~> 3.12.0)
39
- rspec-expectations (~> 3.12.0)
40
- rspec-mocks (~> 3.12.0)
41
- rspec-core (3.12.0)
42
- rspec-support (~> 3.12.0)
43
- rspec-expectations (3.12.2)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.12.0)
46
- rspec-mocks (3.12.3)
47
- diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.12.0)
49
- rspec-support (3.12.0)
50
- rubocop (1.44.1)
51
- json (~> 2.3)
52
- parallel (~> 1.10)
53
- parser (>= 3.2.0.0)
54
- rainbow (>= 2.2.2, < 4.0)
55
- regexp_parser (>= 1.8, < 3.0)
56
- rexml (>= 3.2.5, < 4.0)
57
- rubocop-ast (>= 1.24.1, < 2.0)
58
- ruby-progressbar (~> 1.7)
59
- unicode-display_width (>= 2.4.0, < 3.0)
60
- rubocop-ast (1.24.1)
61
- parser (>= 3.1.1.0)
62
- ruby-progressbar (1.11.0)
63
- tzinfo (2.0.6)
64
- concurrent-ruby (~> 1.0)
65
- unicode-display_width (2.4.2)
66
-
67
- PLATFORMS
68
- arm64-darwin-22
69
-
70
- DEPENDENCIES
71
- graphql-filters!
72
- rake (~> 13.0)
73
- rspec (~> 3.0)
74
- rubocop (~> 1.21)
75
-
76
- BUNDLED WITH
77
- 2.3.9
@@ -1,27 +0,0 @@
1
- require 'active_support/concern'
2
-
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
13
- end
14
-
15
- def default_model_class
16
- raise 'You must set an explicit model for anonymous graphql classes' if name.nil?
17
-
18
- default_model_name = name.delete_suffix 'Type'
19
-
20
- raise "No default model found for #{name}" unless const_defined? default_model_name
21
-
22
- const_get default_model_name
23
- end
24
- end
25
- end
26
-
27
- GraphQL::Schema::Object.prepend monkey_patch
@@ -1,3 +0,0 @@
1
- Dir['dsl/**/*.rb', base: __dir__].each do |filename|
2
- require_relative filename
3
- end
@@ -1,15 +0,0 @@
1
- require 'active_support/configurable'
2
- require 'active_support/core_ext/module/delegation'
3
- require 'graphql'
4
-
5
- module GraphQL
6
- module ModelsConnect
7
- include ActiveSupport::Configurable
8
-
9
- singleton_class.delegate(*config.keys, to: :config)
10
- end
11
- end
12
-
13
- # These need to be here, after the definition of GraphQL::ModelsConnect
14
-
15
- require_relative 'models_connect/dsl'