graphql-rails 0.0.8 → 0.0.9

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
  SHA1:
3
- metadata.gz: 7cbe8b3eba8a94b62d3fe1dfbe37e10cbcf87c42
4
- data.tar.gz: bd25dfb4af25f46443aec44ae262fca3422fcce0
3
+ metadata.gz: 9bf7670f4aeef3e77b11d590d855f815af0aa2b7
4
+ data.tar.gz: a641188d33206881853d649aa70ab4bc80e87cee
5
5
  SHA512:
6
- metadata.gz: d14590f4efe8c8c4dc84faf7b9cbde93c2cdf8c95fe3619131e145e45614cdf23f9554c0687597298011d58706cb820f11b3547a58e929278a46055811960d5b
7
- data.tar.gz: 4eda6e8c44afdac0fa9b04989a3509f54e8b1b4c64c63041eb3a8669b071cfc2ffbd6917569a73c1d37c2afefb877c2b54ca8961610d78bd3642a25d5e6f2095
6
+ metadata.gz: c6b9d5b9c51404fe66d4241f07398d3b7012fe776fb0a73f99718cda187f8716443c70d22e0b9bd9f3568fe019d04c26a999af2bd1eddd5979ea4c7d6ea62703
7
+ data.tar.gz: bb9b84f3d222081f0ed2fb0f258b2071a6445fe189dcbeb4bcfc1e383c70c5e2b26118188f276ec8844667a7be187315b866f960e7ab0b64b8ca2e951352bf82
@@ -66,10 +66,14 @@ module GraphQL
66
66
  types[type] = GraphQL::ObjectType.define do
67
67
  name type_name
68
68
 
69
- # Add the global node ID, if enabled.
69
+ # Add the global node ID, if enabled; otherwise, document ID.
70
70
  if Rails.config.global_ids
71
71
  interfaces [NodeIdentification.interface]
72
72
  global_id_field :id
73
+ else
74
+ field :id do
75
+ type -> { Types.resolve(BSON::ObjectId) }
76
+ end
73
77
  end
74
78
 
75
79
  # Add each field from the document.
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Rails
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Reggio