graphiti 1.6.3 → 1.6.4

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: d9fe56af10e2f476d55ff2d367e4efd0841f73afbe4d4f95cae0f9ab81f6a39e
4
- data.tar.gz: 4d3037e59ed89ed1bfb5bd4af49d6cd80038661907d8983ecfd5a17afa96c061
3
+ metadata.gz: 60dd55a9db78fcc197c66de85b88bd69e840462d77a679dbb76fcd41b040dbe1
4
+ data.tar.gz: e6a2cdefe4435864ea9101c94ac122d3c11ba0e85b7284f19a08f5ec4a3cee0d
5
5
  SHA512:
6
- metadata.gz: f09aeaedda7fc10d97270fe89789fb1b038a2efe4615136fe1ccc576059c5af4b57c9bf97a0f79e38d240ba44f99b4d31f662b27a7d7f3128622bb8ae60429ef
7
- data.tar.gz: 5c965ae2e16ceb97a7e2aa5341cff1e039a8f43d17c2766c884adfb9b0f1ae16fd5df16f1ca7973b3b27face19f80a6e541c43558f9dfbaedf72909b6ae8c361
6
+ metadata.gz: 2264e0a1313762c00ffb96fbb80c60bbc7d6406e37fedc8eef0a9b813b6bc5d5ff9443ca165d2afcf7499c61f9746a0d851b699b9ec5f90ba5ca74c16932c428
7
+ data.tar.gz: 74d51069de9047b07d213c628889766d54d8e8c43812d75a433247e70bc2b027dc7735e310bd0460a36e37083c7a9306dddbeb5d15b0160987cb8f5a65daaa93
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  graphiti changelog
2
2
 
3
+ ## [1.6.4](https://github.com/graphiti-api/graphiti/compare/v1.6.3...v1.6.4) (2024-03-27)
4
+
3
5
  ## [1.6.3](https://github.com/graphiti-api/graphiti/compare/v1.6.2...v1.6.3) (2024-03-26)
4
6
 
5
7
 
@@ -5,7 +5,7 @@ module Graphiti
5
5
 
6
6
  class_methods do
7
7
  def all(params = {}, base_scope = nil)
8
- validate!(params)
8
+ validate_request!(params)
9
9
  _all(params, {}, base_scope)
10
10
  end
11
11
 
@@ -17,7 +17,7 @@ module Graphiti
17
17
  end
18
18
 
19
19
  def find(params = {}, base_scope = nil)
20
- validate!(params)
20
+ validate_request!(params)
21
21
  _find(params, base_scope)
22
22
  end
23
23
 
@@ -38,14 +38,14 @@ module Graphiti
38
38
  end
39
39
 
40
40
  def build(params, base_scope = nil)
41
- validate!(params)
41
+ validate_request!(params)
42
42
  runner = Runner.new(self, params)
43
43
  runner.proxy(base_scope, single: true, raise_on_missing: true)
44
44
  end
45
45
 
46
46
  private
47
47
 
48
- def validate!(params)
48
+ def validate_request!(params)
49
49
  return if Graphiti.context[:graphql] || !validate_endpoints?
50
50
 
51
51
  if context&.respond_to?(:request)
@@ -74,6 +74,7 @@ module Graphiti
74
74
  end
75
75
  end
76
76
  alias_method :to_a, :data
77
+ alias_method :resolve_data, :data
77
78
 
78
79
  def meta
79
80
  @meta ||= data.respond_to?(:meta) ? data.meta : {}
@@ -136,7 +137,7 @@ module Graphiti
136
137
  end
137
138
 
138
139
  def destroy
139
- data
140
+ resolve_data
140
141
  transaction_response = @resource.transaction do
141
142
  metadata = {method: :destroy}
142
143
  model = @resource.destroy(@query.filters[:id], metadata)
@@ -154,7 +155,7 @@ module Graphiti
154
155
  end
155
156
 
156
157
  def update
157
- data
158
+ resolve_data
158
159
  save(action: :update)
159
160
  end
160
161
 
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.6.3"
2
+ VERSION = "1.6.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-26 00:00:00.000000000 Z
11
+ date: 2024-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-serializable