graphql_types 0.2.0 → 0.3.0

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: 04c17ac5b73df7f4af082cdfdaf6c57df1145841
4
- data.tar.gz: 6f4df27cc9538c04dd34d232c0467dd36cf9fbcf
3
+ metadata.gz: a89aeecac0fa950c1e92ed6b5ee33807c32632cf
4
+ data.tar.gz: f46a7a5001343b34cabd7044fb91a58104b3723f
5
5
  SHA512:
6
- metadata.gz: 2062163299792594a1079e3039a138e98d06efc10b856a111a022e7818c6c3a883d81f0367788976b3a55e9ddf38c2f3e19c09deedd549ca70a507e16bf17930
7
- data.tar.gz: dc5683b9df6b5b200479c266b90c92861214dd2f6d4bf0f2129936ed8cb7ae456f222dae14cd55de2f9b4436d25b1657f3150b3c8e5c0da153a65fbe30cc533e
6
+ metadata.gz: 6ad07e1616a05008ffc442cc93c43042e560626bdb535c8fd13c9f9d182a6254abee1c8276414031daa3adbcc8bef531e20a84be07be29ec2cf67e45007486e9
7
+ data.tar.gz: 670d41ede49305d4b5d58500de06d7ba9729dd4ac96929754e306d665ed21b28793074701c6ead3775f5101ccac29ba14e60ea41de420be512b59ade92789c5b
@@ -1,5 +1,10 @@
1
1
  # The Revision History of grapql_types
2
2
 
3
+ ## v0.3.0 - 2017/10/10
4
+
5
+ * Add `AnyType` for types like TypeScript's `any` type
6
+ * Deprecate `JsonType`, use `AnyType` instead
7
+
3
8
  ## v0.2.0 - 2017/09/21
4
9
 
5
10
  * Fix gemspec.homepage url
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::JsonType` as `JSON`
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/[USERNAME]/graphql_json_type.
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
 
@@ -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) }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GraphqlTypes
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
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.2.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-09-21 00:00:00.000000000 Z
11
+ date: 2017-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql