graphql 0.8.0 → 0.8.1

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: 9893aa36baed8d8eef998b94e2a7e1e160f6bc30
4
- data.tar.gz: 838caa42e67801cf03761deae983200af1eccb71
3
+ metadata.gz: 8c0ce19c395ce2fa16c8bdda05deb21afff1ed50
4
+ data.tar.gz: 3b0d23d2040af5c80c658540184c73b498e9953e
5
5
  SHA512:
6
- metadata.gz: b54e1f57376d148e3c8f6df3043bb4cde33f27374b02c3022ce96ebd39d5fc3bda70e60737501c29963ec320e510c1c2f593b904f651dfcd1603e24c074aa3a6
7
- data.tar.gz: f3086c08018736a123143ae7221fc4b7ea7df30430eabd43d154bace39364235ad1383ca55022389ec8b115fe6944e6d416340e9dfb88c2e25bf13d5a1b06850
6
+ metadata.gz: 8d19a08cc0c1924b68cffbfc70684fd72c9294eb11a96262efbbd6941c8885aec35a19c5bb2776ffb470b90be6f83dfafb969c275bdde6af25cdf236b7f1faec
7
+ data.tar.gz: dcc7027ef6dabc7a901e7c0b355df51b3fbbbea5922f987a835dcb0dc85ebdef9c27f9d5a12e4c43279d465feacc4862a58eef9c041c8ebe46c7fcc6a124b116
@@ -48,23 +48,6 @@ class GraphQL::Query
48
48
  def validation_errors
49
49
  @validation_errors ||= @schema.static_validator.validate(@document)
50
50
  end
51
-
52
- # Expose some query-specific info to field resolve functions.
53
- # It delegates `[]` to the hash that's passed to `GraphQL::Query#initialize`.
54
- class Context
55
- attr_accessor :execution_strategy, :ast_node
56
- def initialize(values:)
57
- @values = values
58
- end
59
-
60
- def [](key)
61
- @values[key]
62
- end
63
-
64
- def async(&block)
65
- execution_strategy.async(block)
66
- end
67
- end
68
51
  end
69
52
 
70
53
  require 'graphql/query/arguments'
@@ -74,3 +57,4 @@ require 'graphql/query/parallel_execution'
74
57
  require 'graphql/query/type_resolver'
75
58
  require 'graphql/query/directive_chain'
76
59
  require 'graphql/query/executor'
60
+ require 'graphql/query/context'
@@ -0,0 +1,20 @@
1
+ module GraphQL
2
+ class Query
3
+ # Expose some query-specific info to field resolve functions.
4
+ # It delegates `[]` to the hash that's passed to `GraphQL::Query#initialize`.
5
+ class Context
6
+ attr_accessor :execution_strategy, :ast_node
7
+ def initialize(values:)
8
+ @values = values
9
+ end
10
+
11
+ def [](key)
12
+ @values[key]
13
+ end
14
+
15
+ def async(&block)
16
+ execution_strategy.async(block)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -15,6 +15,7 @@ module GraphQL
15
15
 
16
16
  def async(block)
17
17
  @has_futures ||= true
18
+ warn("GraphQL::Query::ParallelExecution has been extracted to the `graphql-parallel` gem, use that instead!")
18
19
  pool.future.resolve(block)
19
20
  end
20
21
 
@@ -1,3 +1,3 @@
1
1
  module GraphQL
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
data/readme.md CHANGED
@@ -123,6 +123,7 @@ If you're building a backend for [Relay](http://facebook.github.io/relay/), you'
123
123
  - `graphql-ruby` + Rails demo ([src](https://github.com/rmosolgo/graphql-ruby-demo) / [heroku](http://graphql-ruby-demo.herokuapp.com))
124
124
  - [GraphQL Slack](https://graphql-slack.herokuapp.com/)
125
125
  - [Example Relay support](https://github.com/rmosolgo/graphql-relay-ruby) in Ruby
126
+ - [`graphql-parallel`][https://github.com/rmosolgo/graphql-parallel], an asynchronous query execution strategy
126
127
 
127
128
  ## P.S.
128
129
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
@@ -224,6 +224,7 @@ files:
224
224
  - lib/graphql/query/base_execution.rb
225
225
  - lib/graphql/query/base_execution/selected_object_resolution.rb
226
226
  - lib/graphql/query/base_execution/value_resolution.rb
227
+ - lib/graphql/query/context.rb
227
228
  - lib/graphql/query/directive_chain.rb
228
229
  - lib/graphql/query/executor.rb
229
230
  - lib/graphql/query/parallel_execution.rb