graphql-relay 0.9.4 → 0.9.5

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: c199461194766c4c44e820be0e346d2d59c529d3
4
- data.tar.gz: 4beea3df70998080e39c4376a1f6c614c072b9db
3
+ metadata.gz: ca117eb5aae107a37d955dbbf1971fcff9b4ce2a
4
+ data.tar.gz: b649a37eda6edcac52eeb052a91dbec8044bad8d
5
5
  SHA512:
6
- metadata.gz: 2725c42809339124694f24f3d727788cef004177034530b0f1c3314c71dbae57f0b304fb8f242a8912a91c45b49a97840db02554a1663c3675f15b378c3869d2
7
- data.tar.gz: 66a661d083405b52088527dbf1258e59959897ef184bc4764e4dec8df3c32cba6119add073c741ff6e9ac4de3a642cb473f261eba04dd945433cf131e4b290eb
6
+ metadata.gz: 803c22f1589f6a1e6402daea33475320330c8e742a8a17536aa6d25e42bddff4ef46a831873cfb59c2f53ec07ccce2c85e6b97e23b0c4ccb9d5a7882a71db665
7
+ data.tar.gz: 15b528c953e11c1aa3fb07a8a5a66bdc79fc00f9ec466092ea2e50ab1d9fa2fb9ab99718e9c1714bb75b7e083a801042959b6715cc17a4df785c5e13eee21608
data/README.md CHANGED
@@ -347,6 +347,7 @@ https://medium.com/@gauravtiwari/graphql-and-relay-on-rails-first-relay-powered-
347
347
  - Make GlobalId a property of the schema, not a global
348
348
  - Reduce duplication in ArrayConnection / RelationConnection
349
349
  - Improve API for creating edges (better RANGE_ADD support)
350
+ - If the new edge isn't a member of the connection's objects, raise a nice error
350
351
 
351
352
  ## More Resources
352
353
 
@@ -9,7 +9,8 @@ module GraphQL
9
9
  #
10
10
  class GlobalNodeIdentification
11
11
  include GraphQL::Define::InstanceDefinable
12
- accepts_definitions(:object_from_id, :type_from_object, :to_global_id, :from_global_id)
12
+ accepts_definitions(:object_from_id, :type_from_object, :to_global_id, :from_global_id, :description)
13
+ attr_accessor :description
13
14
 
14
15
  class << self
15
16
  attr_accessor :instance, :id_separator
@@ -56,6 +57,7 @@ module GraphQL
56
57
  resolve -> (obj, args, ctx) {
57
58
  ident.object_from_id(args[:id], ctx)
58
59
  }
60
+ description ident.description
59
61
  end
60
62
  end
61
63
 
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Relay
3
- VERSION = '0.9.4'
3
+ VERSION = "0.9.5"
4
4
  end
5
5
  end
@@ -87,6 +87,8 @@ describe GraphQL::Relay::GlobalNodeIdentification do
87
87
  from_global_id -> (global_id) {
88
88
  global_id.split("/")
89
89
  }
90
+
91
+ description "Hello, World!"
90
92
  end
91
93
  end
92
94
 
@@ -109,6 +111,12 @@ describe GraphQL::Relay::GlobalNodeIdentification do
109
111
  assert_equal "Yavin", base_name
110
112
  end
111
113
  end
114
+
115
+ describe "setting a description" do
116
+ it "allows you to set a description" do
117
+ assert_equal "Hello, World!", @new_node_id.field.description
118
+ end
119
+ end
112
120
  end
113
121
  end
114
122
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-relay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql