graphiti_gql 0.2.21 → 0.2.22

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: 933f1a2f88f12ad842f261023b05c8f5cc764ffbe61e7c6686ad88e2d013f8c8
4
- data.tar.gz: 89f3c1c9fd1dcaa5160e1b0f9df9e81c0ff869a55d2842db365a1dfd14c942fe
3
+ metadata.gz: 1a79d794e346a1f884170026503f4ca36a5c82529a47dd977b34335457d4a630
4
+ data.tar.gz: 0ee188c2f278895a47b27c8dbe57b1117dfe352350a99bec8a908702cc782411
5
5
  SHA512:
6
- metadata.gz: 2de7c71483561731e957887da213322caf2c10b9d6836660b15ecd6572c743dffc1f34de139d15ff05dae13392b28186e35b01a2ee409cbe5c22f86c4a75066e
7
- data.tar.gz: 973e35034e8c7a2b01eb5301f8db86df99a1631adfadf35e6e608f95fa31aec08d89da68df8833edc460af5525a8c3e240ff70d3576fc5180ef98614e87f58d3
6
+ metadata.gz: d4eb9c8bb29c513cc9b8eed6e7dafffbefa1de88ab9e1dbc32d1f921b0664ee066c671d36c05eeb15614accded9ba56d4247010ea9c83bf55e0f76ae4d036b31
7
+ data.tar.gz: 014ee03255a4c2b26bbe178d6c60f4f071955a288dac725aa75ae84dcd6624bde251442ea3f7e7811bae4ec9b7f463f024cdcc5c3c4f6f90ec8575e7eb071999
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphiti_gql (0.2.18)
4
+ graphiti_gql (0.2.21)
5
+ activemodel (> 6.0, < 8.0)
5
6
  graphiti (~> 1.3.9)
6
7
  graphql (~> 2.0)
7
8
  graphql-batch (~> 0.5)
@@ -82,7 +83,6 @@ PLATFORMS
82
83
  arm64-darwin-21
83
84
 
84
85
  DEPENDENCIES
85
- activemodel (~> 7.0)
86
86
  bundler (~> 2.3)
87
87
  graphiti_gql!
88
88
  pry
data/graphiti_gql.gemspec CHANGED
@@ -38,9 +38,9 @@ Gem::Specification.new do |spec|
38
38
  spec.add_dependency "graphql", "~> 2.0"
39
39
  spec.add_dependency "graphql-batch", "~> 0.5"
40
40
  spec.add_dependency "graphiti", "~> 1.3.9"
41
+ spec.add_dependency "activemodel", ["> 6.0", "< 8.0"]
41
42
 
42
43
  spec.add_development_dependency "bundler", "~> 2.3"
43
44
  spec.add_development_dependency "rake", "~> 10.0"
44
45
  spec.add_development_dependency "rspec", "~> 3.0"
45
- spec.add_development_dependency "activemodel", "~> 7.0"
46
46
  end
@@ -16,7 +16,10 @@ module GraphitiGql
16
16
  module ResourceExtras
17
17
  extend ActiveSupport::Concern
18
18
 
19
- included do
19
+ prepended do
20
+ extend ActiveModel::Callbacks
21
+ define_model_callbacks :query
22
+
20
23
  class << self
21
24
  attr_accessor :graphql_name, :singular
22
25
  end
@@ -57,7 +60,14 @@ module GraphitiGql
57
60
  @selections
58
61
  end
59
62
 
63
+ def around_scoping(original_scope, query_hash)
64
+ run_callbacks :query do
65
+ super { |scope| yield scope }
66
+ end
67
+ end
68
+
60
69
  class_methods do
70
+
61
71
  def attribute(*args)
62
72
  super(*args).tap do
63
73
  opts = args.extract_options!
@@ -85,7 +95,7 @@ module GraphitiGql
85
95
  end
86
96
  end
87
97
  end
88
- Graphiti::Resource.send(:include, ResourceExtras)
98
+ Graphiti::Resource.send(:prepend, ResourceExtras)
89
99
 
90
100
  module FilterExtras
91
101
  def filter_param
@@ -1,3 +1,3 @@
1
1
  module GraphitiGql
2
- VERSION = "0.2.21"
2
+ VERSION = "0.2.22"
3
3
  end
data/lib/graphiti_gql.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "active_support/core_ext/object/json"
2
2
  require "graphql"
3
3
  require 'graphql/batch'
4
+ require 'active_model'
4
5
  require "graphiti_gql/graphiti_hax"
5
6
  require "graphiti_gql/version"
6
7
  require "graphiti_gql/errors"
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti_gql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-08-09 00:00:00.000000000 Z
@@ -52,6 +52,26 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.9
55
+ - !ruby/object:Gem::Dependency
56
+ name: activemodel
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">"
60
+ - !ruby/object:Gem::Version
61
+ version: '6.0'
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '8.0'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">"
70
+ - !ruby/object:Gem::Version
71
+ version: '6.0'
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '8.0'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: bundler
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -94,21 +114,7 @@ dependencies:
94
114
  - - "~>"
95
115
  - !ruby/object:Gem::Version
96
116
  version: '3.0'
97
- - !ruby/object:Gem::Dependency
98
- name: activemodel
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '7.0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '7.0'
111
- description:
117
+ description:
112
118
  email:
113
119
  - richmolj@gmail.com
114
120
  executables: []
@@ -169,7 +175,7 @@ licenses:
169
175
  - MIT
170
176
  metadata:
171
177
  homepage_uri: https://www.graphiti.dev
172
- post_install_message:
178
+ post_install_message:
173
179
  rdoc_options: []
174
180
  require_paths:
175
181
  - lib
@@ -184,8 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
190
  - !ruby/object:Gem::Version
185
191
  version: '0'
186
192
  requirements: []
187
- rubygems_version: 3.0.3.1
188
- signing_key:
193
+ rubygems_version: 3.3.7
194
+ signing_key:
189
195
  specification_version: 4
190
196
  summary: GraphQL support for Graphiti
191
197
  test_files: []