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 +4 -4
- data/lib/graphql/query.rb +3 -3
- data/lib/graphql/version.rb +1 -1
- data/spec/graphql/query_spec.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7468a99f3a243670d95dc1b6423d6de98aeacd20
|
4
|
+
data.tar.gz: ac2dd7a0264557a07349df7a5a7c84eca070d27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43b4b7f8618b984e00f6c646d3ed547f2cdbc0417ea83c8bed1461d10482d48ade39938facde49636c7f73f945b360eb964516bd8eeb648b03af4941db0098f1
|
7
|
+
data.tar.gz: a82abfa0257bae1387fffb3fb06eead5010236b4670c9093db38e0343f81b9bccb08a3140887f4a109be67da773eb97593b669752cb17b124494bdf555fd27c4
|
data/lib/graphql/query.rb
CHANGED
@@ -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
|
41
|
-
|
40
|
+
def selected_operation_name
|
41
|
+
selected_operation.name
|
42
42
|
end
|
43
43
|
|
44
44
|
# Prepare query `query_string` on `schema`
|
data/lib/graphql/version.rb
CHANGED
data/spec/graphql/query_spec.rb
CHANGED
@@ -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
|
92
|
-
assert_equal
|
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.
|
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-
|
11
|
+
date: 2017-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|