cm-graphql 0.0.7 → 0.0.8

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: bfe03ea1105356f62c221657ccf7e1ac08f138cc537a1e28bf70f9ad1aa0e0b7
4
- data.tar.gz: 8275b35c3ba06d16d1be8a32ea6fd0e528c9a6db7c63793d84f2d1e65d62a734
3
+ metadata.gz: 56ea64e15d7c0d65f0b6f21e04ffe418d411bd784ec37903e3a640b0b4ae1ffb
4
+ data.tar.gz: 6c512133b0c2e0468d625c4935343cbfd13582968429d83aace9d69434fbdb6c
5
5
  SHA512:
6
- metadata.gz: 742fa1b707f8fd4e726879779293563da46f8c901f64987fd0897d0ccb6aafcf60a9fb010aa7e58d109da244584bbdc5074ac2d8ef142f6bfdc5c5727b3989da
7
- data.tar.gz: 7ee1c3308c49eb9f5b14ce47c2b2d710160c8087b2bc645326ffb3e3a6b355e68614ca7856879659a14b546225dc19730dd13f22edfd311f0314b1d1f05b4811
6
+ metadata.gz: f9d6986119de8ab2a2bcbbf131898ae2603922c831bab6a5dacf944a30bba7e79986efa2ff47b2aaac98d2ccdbe4fddace2b6a209151dcd6d8ff6a7aaef5deab
7
+ data.tar.gz: 2036fa861286d2c055db30e2f2ee3a6e77910a23b06d6d9f9fdb77a8dedf753503060a566d65956bf717ea02bcd19a44093399743d40f83c9204be68b833fecb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-graphql (0.0.6)
4
+ cm-graphql (0.0.8)
5
5
  graphiql-rails (>= 1.9)
6
6
  graphql (>= 2.2.5)
7
7
  graphql-rails_logger (>= 1.2.4)
@@ -10,61 +10,68 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (7.1.3.3)
14
- actionview (= 7.1.3.3)
15
- activesupport (= 7.1.3.3)
13
+ actionpack (8.0.2)
14
+ actionview (= 8.0.2)
15
+ activesupport (= 8.0.2)
16
16
  nokogiri (>= 1.8.5)
17
- racc
18
17
  rack (>= 2.2.4)
19
18
  rack-session (>= 1.0.1)
20
19
  rack-test (>= 0.6.3)
21
20
  rails-dom-testing (~> 2.2)
22
21
  rails-html-sanitizer (~> 1.6)
23
- actionview (7.1.3.3)
24
- activesupport (= 7.1.3.3)
22
+ useragent (~> 0.16)
23
+ actionview (8.0.2)
24
+ activesupport (= 8.0.2)
25
25
  builder (~> 3.1)
26
26
  erubi (~> 1.11)
27
27
  rails-dom-testing (~> 2.2)
28
28
  rails-html-sanitizer (~> 1.6)
29
- activemodel (7.1.3.3)
30
- activesupport (= 7.1.3.3)
31
- activerecord (7.1.3.3)
32
- activemodel (= 7.1.3.3)
33
- activesupport (= 7.1.3.3)
29
+ activemodel (8.0.2)
30
+ activesupport (= 8.0.2)
31
+ activerecord (8.0.2)
32
+ activemodel (= 8.0.2)
33
+ activesupport (= 8.0.2)
34
34
  timeout (>= 0.4.0)
35
- activesupport (7.1.3.3)
35
+ activesupport (8.0.2)
36
36
  base64
37
+ benchmark (>= 0.3)
37
38
  bigdecimal
38
- concurrent-ruby (~> 1.0, >= 1.0.2)
39
+ concurrent-ruby (~> 1.0, >= 1.3.1)
39
40
  connection_pool (>= 2.2.5)
40
41
  drb
41
42
  i18n (>= 1.6, < 2)
43
+ logger (>= 1.4.2)
42
44
  minitest (>= 5.1)
43
- mutex_m
44
- tzinfo (~> 2.0)
45
+ securerandom (>= 0.3)
46
+ tzinfo (~> 2.0, >= 2.0.5)
47
+ uri (>= 0.13.1)
45
48
  base64 (0.2.0)
46
- bigdecimal (3.1.8)
49
+ benchmark (0.4.0)
50
+ bigdecimal (3.1.9)
47
51
  builder (3.3.0)
48
- concurrent-ruby (1.3.4)
49
- connection_pool (2.4.1)
52
+ concurrent-ruby (1.3.5)
53
+ connection_pool (2.5.2)
50
54
  crass (1.0.6)
55
+ date (3.4.1)
51
56
  drb (2.2.1)
52
- erubi (1.13.0)
53
- fiber-storage (1.0.0)
54
- graphiql-rails (1.10.1)
57
+ erubi (1.13.1)
58
+ fiber-storage (1.0.1)
59
+ graphiql-rails (1.10.4)
55
60
  railties
56
- graphql (2.3.17)
61
+ graphql (2.5.4)
57
62
  base64
58
63
  fiber-storage
59
- graphql-rails_logger (1.2.4)
64
+ logger
65
+ graphql-rails_logger (1.2.5)
60
66
  actionpack (> 5.0)
61
67
  activesupport (> 5.0)
62
68
  railties (> 5.0)
63
- rouge (~> 3.0)
64
- i18n (1.14.6)
69
+ rouge (>= 3.0)
70
+ i18n (1.14.7)
65
71
  concurrent-ruby (~> 1.0)
66
- io-console (0.7.2)
67
- irb (1.14.1)
72
+ io-console (0.8.0)
73
+ irb (1.15.2)
74
+ pp (>= 0.6.0)
68
75
  rdoc (>= 4.0.0)
69
76
  reline (>= 0.4.2)
70
77
  kaminari (1.2.2)
@@ -79,56 +86,62 @@ GEM
79
86
  activerecord
80
87
  kaminari-core (= 1.2.2)
81
88
  kaminari-core (1.2.2)
82
- loofah (2.22.0)
89
+ logger (1.7.0)
90
+ loofah (2.24.0)
83
91
  crass (~> 1.0.2)
84
92
  nokogiri (>= 1.12.0)
85
- mini_portile2 (2.8.7)
86
- minitest (5.25.1)
87
- mutex_m (0.2.0)
88
- nokogiri (1.16.7)
93
+ mini_portile2 (2.8.8)
94
+ minitest (5.25.5)
95
+ nokogiri (1.18.8)
89
96
  mini_portile2 (~> 2.8.2)
90
97
  racc (~> 1.4)
91
- nokogiri (1.16.7-arm64-darwin)
98
+ nokogiri (1.18.8-arm64-darwin)
92
99
  racc (~> 1.4)
93
- psych (5.1.2)
100
+ pp (0.6.2)
101
+ prettyprint
102
+ prettyprint (0.2.0)
103
+ psych (5.2.3)
104
+ date
94
105
  stringio
95
106
  racc (1.8.1)
96
- rack (3.1.7)
97
- rack-session (2.0.0)
107
+ rack (3.1.13)
108
+ rack-session (2.1.0)
109
+ base64 (>= 0.1.0)
98
110
  rack (>= 3.0.0)
99
- rack-test (2.1.0)
111
+ rack-test (2.2.0)
100
112
  rack (>= 1.3)
101
- rackup (2.1.0)
113
+ rackup (2.2.1)
102
114
  rack (>= 3)
103
- webrick (~> 1.8)
104
115
  rails-dom-testing (2.2.0)
105
116
  activesupport (>= 5.0.0)
106
117
  minitest
107
118
  nokogiri (>= 1.6)
108
- rails-html-sanitizer (1.6.0)
119
+ rails-html-sanitizer (1.6.2)
109
120
  loofah (~> 2.21)
110
- nokogiri (~> 1.14)
111
- railties (7.1.3.3)
112
- actionpack (= 7.1.3.3)
113
- activesupport (= 7.1.3.3)
114
- irb
121
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
122
+ railties (8.0.2)
123
+ actionpack (= 8.0.2)
124
+ activesupport (= 8.0.2)
125
+ irb (~> 1.13)
115
126
  rackup (>= 1.0.0)
116
127
  rake (>= 12.2)
117
128
  thor (~> 1.0, >= 1.2.2)
118
129
  zeitwerk (~> 2.6)
119
130
  rake (13.2.1)
120
- rdoc (6.7.0)
131
+ rdoc (6.13.1)
121
132
  psych (>= 4.0.0)
122
- reline (0.5.10)
133
+ reline (0.6.1)
123
134
  io-console (~> 0.5)
124
- rouge (3.30.0)
125
- stringio (3.1.1)
135
+ rouge (4.5.1)
136
+ securerandom (0.4.1)
137
+ stringio (3.1.7)
126
138
  thor (1.3.2)
127
- timeout (0.4.1)
139
+ timeout (0.4.3)
128
140
  tzinfo (2.0.6)
129
141
  concurrent-ruby (~> 1.0)
130
- webrick (1.8.2)
131
- zeitwerk (2.6.18)
142
+ uri (1.0.3)
143
+ useragent (0.16.11)
144
+ zeitwerk (2.7.2)
132
145
 
133
146
  PLATFORMS
134
147
  arm64-darwin-20
@@ -139,4 +152,4 @@ DEPENDENCIES
139
152
  cm-graphql!
140
153
 
141
154
  BUNDLED WITH
142
- 2.2.33
155
+ 2.6.8
@@ -0,0 +1,27 @@
1
+ module Types
2
+ module EnumHelpers
3
+ def self.enum_from_model(model, enum_name, graphql_enum_name: nil)
4
+ enum_values = model.send(enum_name.to_s.pluralize).keys
5
+
6
+ Class.new(Types::BaseEnum) do
7
+ graphql_name(graphql_enum_name || "#{model.name}#{enum_name.to_s.camelize}Enum")
8
+
9
+ enum_values.each do |val|
10
+ value val, description: "#{val.titleize} #{enum_name}"
11
+ end
12
+ end
13
+ end
14
+
15
+ def self.enum_from_array(array, graphql_enum_name)
16
+ enum_values = array.map(&:to_s)
17
+
18
+ Class.new(Types::BaseEnum) do
19
+ graphql_name(graphql_enum_name)
20
+
21
+ enum_values.each do |val|
22
+ value val, description: val.titleize
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
data/cm-graphql.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'cm-graphql'
5
- spec.version = '0.0.7'
5
+ spec.version = '0.0.8'
6
6
  spec.date = '2022-09-14'
7
7
  spec.summary = 'A gem to setup grapqhl basics like pagination, file upload'
8
8
  spec.description = 'A gem to setup grapqhl basics like pagination, file upload'
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cm-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anbazhagan Palani
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
10
  date: 2022-09-14 00:00:00.000000000 Z
@@ -89,6 +88,7 @@ files:
89
88
  - app/graphql/mutations/base_mutation.rb
90
89
  - app/graphql/queries/base_query.rb
91
90
  - app/graphql/types/base_connection.rb
91
+ - app/graphql/types/enum_helpers.rb
92
92
  - app/graphql/types/enums/base/sort_column.rb
93
93
  - app/graphql/types/enums/base/sort_direction.rb
94
94
  - app/graphql/types/inputs/base/attachment.rb
@@ -117,7 +117,6 @@ homepage: https://github.com/commutatus/template-paging-api
117
117
  licenses:
118
118
  - MIT
119
119
  metadata: {}
120
- post_install_message:
121
120
  rdoc_options: []
122
121
  require_paths:
123
122
  - lib
@@ -132,8 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
131
  - !ruby/object:Gem::Version
133
132
  version: '0'
134
133
  requirements: []
135
- rubygems_version: 3.5.15
136
- signing_key:
134
+ rubygems_version: 3.6.8
137
135
  specification_version: 4
138
136
  summary: A gem to setup grapqhl basics like pagination, file upload
139
137
  test_files: []