rails-graphql 0.1.0 → 0.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f89afed32f0e7c1c9738f6fc92f99cd25b985f18b830c02e85cf7ba622486b7
|
4
|
+
data.tar.gz: 2b478c122302b2a8f1e7cf386fb2545b1a7665d5745c4e78708541c913ff7d70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6996ae2c2d05697dc923a78eec06a236e7199fe7cbf0e459bf9444792caff76fec3442e0f6006581e2cd49e8ca9d95f0b2d4476ddd57264b274b90db51b5ab62
|
7
|
+
data.tar.gz: 1c885af10dc5187e478ed8887f2b98522ab7ffccb1ff8788a4dbc7d751d78b2560232ac74c6ae89e8c9b47e21021b5b1a5475de5ebdef38c3a5a9604dbaeada1
|
@@ -24,8 +24,8 @@ module Rails # :nodoc:
|
|
24
24
|
# Get the performer that can be already defined or used through the
|
25
25
|
# +method_name+ if that is callable
|
26
26
|
def performer
|
27
|
-
@performer ||= callable?(method_name) \
|
28
|
-
? Callback.new(self, :perform, method_name) \
|
27
|
+
@performer ||= callable?(:"#{method_name}!") \
|
28
|
+
? Callback.new(self, :perform, :"#{method_name}!") \
|
29
29
|
: false
|
30
30
|
end
|
31
31
|
|
@@ -44,9 +44,9 @@ module Rails # :nodoc:
|
|
44
44
|
|
45
45
|
item['path'] = path if path.present? && path.is_a?(Array)
|
46
46
|
item['extensions'] = extra.deep_stringify_keys if extra.present?
|
47
|
-
item['locations']
|
47
|
+
item['locations']&.map!(&:stringify_keys)
|
48
48
|
|
49
|
-
@items << item
|
49
|
+
@items << item.compact
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
data/lib/rails/graphql/source.rb
CHANGED
@@ -145,6 +145,11 @@ module Rails # :nodoc:
|
|
145
145
|
defined?(@built) && !!@built
|
146
146
|
end
|
147
147
|
|
148
|
+
# Checks if a given method can act as resolver
|
149
|
+
def gql_resolver?(method_name)
|
150
|
+
(instance_methods - GraphQL::Source.instance_methods).include?(method_name)
|
151
|
+
end
|
152
|
+
|
148
153
|
# Attach all defined schema fields into the schemas using the namespaces
|
149
154
|
# configured for the source
|
150
155
|
def attach_fields!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|