graphql-cache 0.2.4 → 0.2.5

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: 7f579911d87004ce2b5d4e6c0f5e0dbf2bc5f95b182535a8f0566490877a1472
4
- data.tar.gz: 3739554003d4fed82940cd8400de66f89706ca7191572293408f2a05dd878231
3
+ metadata.gz: 0f508c5138bea5539cbc6e9c95bb41d5af2f5b87ef245acf972ec0a37936dbdd
4
+ data.tar.gz: 7af8a0cc6611334403b91f2c9ac53dba1c0fe8f60a8f9c33775e62aadbb295b4
5
5
  SHA512:
6
- metadata.gz: 5744a889a765c5b9af59a5a30ef4476dddfbd0d57f961ffe02967395f4c3aedb5dcc53abb1ac975a3cf7dca9733fa77c5e6ebcdca29e68cdf839b53a1bc628cc
7
- data.tar.gz: 7e58d355e602df364d5070543243f284c68539ced44d542105f3893d6416733688db7236334b078a59e51e83fa648dda6580555120b3b9c59874d5c8379c35b6
6
+ metadata.gz: b8d43648e3bc7dbb3f524adca874cc5724fab27f14814176f8a0100eb1eb18356670d05389a01252118be05cd329d9b5a035eae4bec0b770a132e85ec6034743
7
+ data.tar.gz: d0d78b24cf23ea06e2011b43c5cac05ed7f4610ef2396035d0658f42c0bb4dc471c996ce800c9e1b892e2e52d6e114d1330c6ab658391bd38fda228c32bbcec8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-cache (0.2.2)
4
+ graphql-cache (0.2.4)
5
5
  graphql (~> 1.8.0)
6
6
 
7
7
  GEM
@@ -16,7 +16,7 @@ GEM
16
16
  coderay (1.1.2)
17
17
  diff-lcs (1.3)
18
18
  docile (1.3.0)
19
- graphql (1.8.0)
19
+ graphql (1.8.4)
20
20
  json (2.1.0)
21
21
  method_source (0.9.0)
22
22
  pry (0.11.3)
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ load Gem.bin_path('rspec-core', 'rspec')
@@ -105,7 +105,7 @@ module GraphQL
105
105
 
106
106
  raw.map do |item|
107
107
  if gql_def.kind.name == 'OBJECT'
108
- config[:field_definition].type.unwrap.graphql_definition.metadata[:type_class].new(
108
+ gql_def.metadata[:type_class].authorized_new(
109
109
  item,
110
110
  config[:query_context]
111
111
  )
@@ -117,9 +117,10 @@ module GraphQL
117
117
 
118
118
  # @private
119
119
  def build_object
120
- klass = config[:field_definition].type.unwrap.graphql_definition.metadata[:type_class]
121
- if klass
122
- klass.new(
120
+ gql_def = config[:field_definition].type.unwrap.graphql_definition
121
+ klass = gql_def.metadata[:type_class]
122
+ if gql_def.kind.name == 'OBJECT' && klass
123
+ klass.authorized_new(
123
124
  raw,
124
125
  config[:query_context]
125
126
  )
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module Cache
5
- VERSION = '0.2.4'
5
+ VERSION = '0.2.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kelly
@@ -144,6 +144,7 @@ files:
144
144
  - README.md
145
145
  - Rakefile
146
146
  - bin/console
147
+ - bin/rspec
147
148
  - bin/setup
148
149
  - gemfiles/graphql_1.8.gemfile
149
150
  - graphql-cache.gemspec