graphql 1.6.0 → 1.6.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: 21a090385055caa75ff227d787c3a794c5134c11
4
- data.tar.gz: f6e6e5b3eb47827061ecc6327d2c431d57558be0
3
+ metadata.gz: 7468a99f3a243670d95dc1b6423d6de98aeacd20
4
+ data.tar.gz: ac2dd7a0264557a07349df7a5a7c84eca070d27c
5
5
  SHA512:
6
- metadata.gz: 9049055982560c7eebe4b37843ce665d885c32ed61f6b97dcb2cbfdefcade29cb62f98914f9824d4e772d410494c75abf732583c7ed2c6ebd87875a26897f7d9
7
- data.tar.gz: ab419676204940e098b0bd2e612ce8cf6aa9b1456b03d599481be19a4a8e9efa4fed16238702e6d8a5a5df2dd4a6af472975400280729074f34c9e202612f0ef
6
+ metadata.gz: 43b4b7f8618b984e00f6c646d3ed547f2cdbc0417ea83c8bed1461d10482d48ade39938facde49636c7f73f945b360eb964516bd8eeb648b03af4941db0098f1
7
+ data.tar.gz: a82abfa0257bae1387fffb3fb06eead5010236b4670c9093db38e0343f81b9bccb08a3140887f4a109be67da773eb97593b669752cb17b124494bdf555fd27c4
@@ -27,7 +27,7 @@ module GraphQL
27
27
  end
28
28
  end
29
29
 
30
- attr_reader :schema, :context, :root_value, :warden, :provided_variables
30
+ attr_reader :schema, :context, :root_value, :warden, :provided_variables, :operation_name
31
31
 
32
32
  attr_accessor :query_string
33
33
 
@@ -37,8 +37,8 @@ module GraphQL
37
37
  end
38
38
 
39
39
  # @return [String, nil] The name of the operation to run (may be inferred)
40
- def operation_name
41
- with_prepared_ast { @operation_name }
40
+ def selected_operation_name
41
+ selected_operation.name
42
42
  end
43
43
 
44
44
  # Prepare query `query_string` on `schema`
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.6.0"
3
+ VERSION = "1.6.1"
4
4
  end
@@ -79,6 +79,7 @@ describe GraphQL::Query do
79
79
 
80
80
  it "returns the provided name" do
81
81
  assert_equal "q2", query.operation_name
82
+ assert_equal "q2", query.selected_operation_name
82
83
  end
83
84
  end
84
85
 
@@ -88,8 +89,9 @@ describe GraphQL::Query do
88
89
  GRAPHQL
89
90
  }
90
91
 
91
- it "returns the inferred name" do
92
- assert_equal "q3", query.operation_name
92
+ it "returns nil" do
93
+ assert_equal nil, query.operation_name
94
+ assert_equal "q3", query.selected_operation_name
93
95
  end
94
96
  end
95
97
  end
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: 1.6.0
4
+ version: 1.6.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: 2017-05-27 00:00:00.000000000 Z
11
+ date: 2017-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips