graphql_types 0.2.0 → 0.3.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -3
- data/lib/graphql_types.rb +10 -1
- data/lib/graphql_types/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a89aeecac0fa950c1e92ed6b5ee33807c32632cf
|
4
|
+
data.tar.gz: f46a7a5001343b34cabd7044fb91a58104b3723f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ad07e1616a05008ffc442cc93c43042e560626bdb535c8fd13c9f9d182a6254abee1c8276414031daa3adbcc8bef531e20a84be07be29ec2cf67e45007486e9
|
7
|
+
data.tar.gz: 670d41ede49305d4b5d58500de06d7ba9729dd4ac96929754e306d665ed21b28793074701c6ead3775f5101ccac29ba14e60ea41de420be512b59ade92789c5b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
This gem provides scalar types that GraphQL core does not have:
|
7
7
|
|
8
|
-
* `GraphqlTypes::
|
8
|
+
* `GraphqlTypes::AnyType` as dynamically-typed objects
|
9
9
|
* `GraphqlTypes::DateType` as `Date`
|
10
10
|
* `GraphqlTypes::BigIntType` as `BigInt`
|
11
11
|
|
@@ -35,11 +35,11 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
35
35
|
|
36
36
|
## Contributing
|
37
37
|
|
38
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bitjourney/graphql_types.
|
39
39
|
|
40
40
|
## Copygirht
|
41
41
|
|
42
|
-
Copyright (c) 2017 Bit Journey, Inc.
|
42
|
+
Copyright (c) 2017 FUJI goro (@gfx) and Bit Journey, Inc.
|
43
43
|
|
44
44
|
## License
|
45
45
|
|
data/lib/graphql_types.rb
CHANGED
@@ -7,10 +7,19 @@ require "json"
|
|
7
7
|
require "time"
|
8
8
|
|
9
9
|
module GraphqlTypes
|
10
|
+
# @type [GraphQL::ScalarType]
|
11
|
+
AnyType = GraphQL::ScalarType.define do
|
12
|
+
name "Any"
|
13
|
+
description "A dynamic-typed object"
|
14
|
+
|
15
|
+
coerce_input ->(x, _context) { x }
|
16
|
+
coerce_result ->(x, _context) { x }
|
17
|
+
end
|
18
|
+
|
10
19
|
# @type [GraphQL::ScalarType]
|
11
20
|
JsonType = GraphQL::ScalarType.define do
|
12
21
|
name "JSON"
|
13
|
-
description "A dynamic object"
|
22
|
+
description "A dynamic-typed object encoded in JSON (deprecated)"
|
14
23
|
|
15
24
|
coerce_input ->(x, _context) { JSON.parse(x) }
|
16
25
|
coerce_result ->(x, _context) { JSON.dump(x) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FUJI Goro (gfx)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|