rails-graphql 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdf2022ac5afdaa3bc0f3068625508c47d5f2df97325427f214f79030f72778b
|
4
|
+
data.tar.gz: 0176fe930c8a991f98c2ad28afb2ebce462fc4a64ad9565fffd8fd29e5ca9019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fc23bb1c616165efbdb46ee04697308245a63f6345418dfb5e972d99543c527abcd18cd926786bc9f8de444a39fda60791e1570c4f60b096a0dea501c7bfaeb
|
7
|
+
data.tar.gz: f09ed8ccfb57024a3334589ce1f609efb29eef330f1af235a47d232b881953472e9b2c25190e3b6b3cefbc4927ae1fef841d171dc82d1e2156874b70c5ea3588
|
@@ -55,7 +55,17 @@ module Rails # :nodoc:
|
|
55
55
|
|
56
56
|
# Return the default value if the given +value+ is nil
|
57
57
|
def deserialize(value = nil)
|
58
|
-
value.nil? ?
|
58
|
+
value.nil? ? default : super
|
59
|
+
end
|
60
|
+
|
61
|
+
# A little override to use the default value
|
62
|
+
def to_json(value = nil)
|
63
|
+
super(value.nil? ? default : value)
|
64
|
+
end
|
65
|
+
|
66
|
+
# A little override to use the default value
|
67
|
+
def as_json(value = nil)
|
68
|
+
super(value.nil? ? default : value)
|
59
69
|
end
|
60
70
|
|
61
71
|
# Checks if the default value of the field is valid
|
@@ -77,7 +77,7 @@ module Rails # :nodoc:
|
|
77
77
|
# Get the GraphQL variables for a request
|
78
78
|
def gql_variables(variables = params[:variables])
|
79
79
|
case variables
|
80
|
-
when ::ActionController::Parameters then variables.permit
|
80
|
+
when ::ActionController::Parameters then variables.permit!.to_h
|
81
81
|
when String then variables.present? ? JSON.parse(variables) : {}
|
82
82
|
when Hash then variables
|
83
83
|
else {}
|
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.3
|
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-12-
|
11
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|