graphql_activerecord_autoselect 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +3 -3
- data/lib/graphql_activerecord_autoselect/version.rb +1 -1
- data/lib/graphql_activerecord_autoselect.rb +9 -9
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 660fb97204acd0358394fcddcdadf783cac1905a18c8b5c920415b8a45e0b888
|
4
|
+
data.tar.gz: 4e2404e946df00b9c23d36711e5a244a74824f13561735b96fec34a0537aa244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c888dc8c6c8f4ebade7f1739098130500dca49cbe5e68e531badf43204f4e2e033bc51c59b395832a712e94657c4314d7e81f8121dfa6fc1f225b2122849d0fe
|
7
|
+
data.tar.gz: 15d7366dfac45310b33a2518241d0b229ea54332bae869d64f1820f5affdbaaa6816aca1b5034c0097e61f4d03aad8a5ff2bea9785fb2a2a67c84194b01eb548
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## v2.0.0
|
2
|
+
|
3
|
+
* Add support for Ruby 3.0
|
4
|
+
* Add support for Ruby 3.1
|
5
|
+
* Add support for ActiveRecord 7
|
6
|
+
* Drop support for Ruby 2.5
|
7
|
+
* Drop support for Ruby 2.6
|
8
|
+
* Drop support for ActiveRecord 5
|
9
|
+
|
10
|
+
|
1
11
|
## v1.0.1
|
2
12
|
|
3
13
|
* Added support for ActiveRecord 5+.
|
data/README.md
CHANGED
@@ -12,8 +12,8 @@ The documentation can be found on [RubyDoc].
|
|
12
12
|
|
13
13
|
### Compatibility
|
14
14
|
|
15
|
-
- Ruby 2.
|
16
|
-
- ActiveRecord
|
15
|
+
- Ruby 2.7+
|
16
|
+
- ActiveRecord 6.0+
|
17
17
|
- GraphQL (Ruby) 1.9+
|
18
18
|
|
19
19
|
|
@@ -22,7 +22,7 @@ The documentation can be found on [RubyDoc].
|
|
22
22
|
Add the gem to your Gemfile and run `bundle`.
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
gem "graphql_activerecord_autoselect", "~>
|
25
|
+
gem "graphql_activerecord_autoselect", "~> 2"
|
26
26
|
```
|
27
27
|
|
28
28
|
|
@@ -10,9 +10,9 @@ module GraphQLActiveRecordAutoSelect
|
|
10
10
|
def autoselect(lookahead, dependents = {})
|
11
11
|
select(
|
12
12
|
GraphQLActiveRecordAutoSelect.call(
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
13
|
+
model: self,
|
14
|
+
lookahead: lookahead,
|
15
|
+
dependents: dependents
|
16
16
|
)
|
17
17
|
)
|
18
18
|
end
|
@@ -22,9 +22,9 @@ module GraphQLActiveRecordAutoSelect
|
|
22
22
|
def autoselect(lookahead, dependents = {})
|
23
23
|
select(
|
24
24
|
GraphQLActiveRecordAutoSelect.call(
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
25
|
+
model: model,
|
26
|
+
lookahead: lookahead,
|
27
|
+
dependents: dependents
|
28
28
|
)
|
29
29
|
)
|
30
30
|
end
|
@@ -32,10 +32,10 @@ module GraphQLActiveRecordAutoSelect
|
|
32
32
|
|
33
33
|
def call(model:, lookahead:, dependents:)
|
34
34
|
primary_key = model.primary_key
|
35
|
-
columns
|
36
|
-
fields
|
35
|
+
columns = model.column_names
|
36
|
+
fields = get_fields(lookahead)
|
37
37
|
|
38
|
-
|
38
|
+
[].tap do |selection|
|
39
39
|
selection.concat filter_by_columns(fields, columns)
|
40
40
|
selection.concat include_identifier_columns(primary_key, columns)
|
41
41
|
selection.concat include_dependents(fields, dependents)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql_activerecord_autoselect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van Rooijen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 8.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 6.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 8.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: graphql
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,56 +56,56 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - '='
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 13.0.6
|
60
60
|
type: :development
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - '='
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: 13.0.6
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: yard
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - '='
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 0.9.
|
73
|
+
version: 0.9.27
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - '='
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 0.9.
|
80
|
+
version: 0.9.27
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: minitest
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
85
|
- - '='
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: 5.
|
87
|
+
version: 5.15.0
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
92
|
- - '='
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: 5.
|
94
|
+
version: 5.15.0
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: simplecov
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
99
|
- - '='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0.
|
101
|
+
version: 0.21.2
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - '='
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: 0.
|
108
|
+
version: 0.21.2
|
109
109
|
description:
|
110
110
|
email:
|
111
111
|
- michael@vanrooijen.io
|
@@ -126,7 +126,7 @@ metadata:
|
|
126
126
|
source_code_uri: https://github.com/mrrooijen/graphql_activerecord_autoselect
|
127
127
|
changelog_uri: https://github.com/mrrooijen/graphql_activerecord_autoselect/blob/master/CHANGELOG.md
|
128
128
|
bug_tracker_uri: https://github.com/mrrooijen/graphql_activerecord_autoselect/issues
|
129
|
-
documentation_uri: https://rubydoc.info/gems/graphql_activerecord_autoselect/
|
129
|
+
documentation_uri: https://rubydoc.info/gems/graphql_activerecord_autoselect/2.0.0
|
130
130
|
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
@@ -135,14 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 2.
|
138
|
+
version: 2.7.0
|
139
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
rubygems_version: 3.
|
145
|
+
rubygems_version: 3.2.22
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Automatic ActiveRecord column selection for GraphQL (Ruby) fields.
|