graphiti 1.0.alpha.20 → 1.0.alpha.21
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 620890dfa261a4dd02ddb09ee9211989ae0287f1
|
4
|
+
data.tar.gz: 572c653a33fd31bd60804036b5ef0d271eb6244b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aabddf2beaf88b0520a75e1dd9ef388eb7956bde1e4c2d9bd8c5e91a9c252dbe0e3b29ea48692a70042df1605c35888247598085e5191e0ba6c6d111f3eb4498
|
7
|
+
data.tar.gz: 3ed785cf44d9b978c91367ee4c0714deb0faa744b540db799679f3ec25f338b2e6a1b7489e61121d28f61b5c1f92793e5e29c214d379183b55e8adada5e48de5
|
@@ -30,6 +30,10 @@ module Graphiti
|
|
30
30
|
" routes.default_url_options[:host] = ENV.fetch('HOST', 'http://localhost:3000')\n"
|
31
31
|
end
|
32
32
|
|
33
|
+
inject_into_file 'spec/rails_helper.rb', after: /RSpec.configure.+^end$/m do
|
34
|
+
"\n\nGraphitiSpecHelpers::RSpec.schema!"
|
35
|
+
end
|
36
|
+
|
33
37
|
insert_into_file "config/routes.rb", :after => "Rails.application.routes.draw do\n" do
|
34
38
|
<<-STR
|
35
39
|
scope path: ApplicationResource.endpoint_namespace, defaults: { format: :jsonapi } do
|
data/lib/graphiti/scope.rb
CHANGED
@@ -41,12 +41,17 @@ module Graphiti
|
|
41
41
|
def sideload(results)
|
42
42
|
return if results == []
|
43
43
|
|
44
|
-
concurrent =
|
44
|
+
concurrent = true#::Graphiti.config.concurrency
|
45
45
|
promises = []
|
46
46
|
|
47
47
|
@query.sideloads.each_pair do |name, q|
|
48
48
|
sideload = @resource.class.sideload(name)
|
49
|
-
resolve_sideload = -> {
|
49
|
+
resolve_sideload = -> {
|
50
|
+
sideload.resolve(results, q)
|
51
|
+
if concurrent && defined?(ActiveRecord)
|
52
|
+
ActiveRecord::Base.clear_active_connections!
|
53
|
+
end
|
54
|
+
}
|
50
55
|
if concurrent
|
51
56
|
promises << Concurrent::Promise.execute(&resolve_sideload)
|
52
57
|
else
|
data/lib/graphiti/version.rb
CHANGED
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.0.alpha.
|
4
|
+
version: 1.0.alpha.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jsonapi-serializable
|