graphql 1.5.6 → 1.5.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d1445225e17cd94b149bf884103195d179505a0
|
4
|
+
data.tar.gz: 909292e9525c37d417b6a97106b0dbe49a899ca6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7730356cc09f2b67a53096830fdb0faef1e8a3b122075a8775ec339375463a9e863dfb48b5fca7efffd9f81f598b486390a8439c1014edafdb1640956f82245c
|
7
|
+
data.tar.gz: c21a3b0f34745786c26c626403ffbfbfe528a61d19f12458d81ea3620932868efdcde017c61df16f6ac074401d48c19aea5a0bb578e6fd9b4e7d31b462f51f36
|
@@ -89,11 +89,14 @@ module GraphQL
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def definition_name
|
92
|
-
|
92
|
+
definition && definition.name
|
93
93
|
end
|
94
94
|
|
95
95
|
def definition
|
96
|
-
@definition ||=
|
96
|
+
@definition ||= begin
|
97
|
+
first_def = @definitions.first
|
98
|
+
first_def && @query.get_field(@owner_type, first_def.name)
|
99
|
+
end
|
97
100
|
end
|
98
101
|
|
99
102
|
def ast_node
|
data/lib/graphql/version.rb
CHANGED
@@ -105,6 +105,7 @@ describe GraphQL::InternalRepresentation::Rewrite do
|
|
105
105
|
|
106
106
|
it "groups selections by object types which they apply to" do
|
107
107
|
doc = rewrite_result["getPlant"]
|
108
|
+
assert_equal nil, doc.definition
|
108
109
|
|
109
110
|
plant_scoped_selection = doc.scoped_children[schema.types["Query"]]["plant"]
|
110
111
|
assert_equal ["Fruit", "Nut", "Plant", "Tree"], plant_scoped_selection.scoped_children.keys.map(&:name).sort
|
@@ -11,6 +11,11 @@ describe GraphQL::Relay::ConnectionField do
|
|
11
11
|
assert_equal ["tests"], test_type.fields.keys
|
12
12
|
end
|
13
13
|
|
14
|
+
it "keeps a reference to the function" do
|
15
|
+
conn_field = StarWars::Faction.fields["shipsWithMaxPageSize"]
|
16
|
+
assert_instance_of StarWars::ShipsWithMaxPageSize, conn_field.function
|
17
|
+
end
|
18
|
+
|
14
19
|
it "leaves the original field untouched" do
|
15
20
|
test_type = nil
|
16
21
|
|
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.5.
|
4
|
+
version: 1.5.7
|
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-04-
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|