graphql 1.5.7 → 1.5.7.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d62327a63cfe014162e4914f6667336e606e8ff
|
4
|
+
data.tar.gz: 2605ce8d9b8c31b29ad2c539f4da250e02450f66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc114df5775f181f92b11aff4c4eaf022506b994d69889fd88643fa7f0b03348ffaddfe7e2851032a6a384259629d5484dfbabb9b7e7185875336390066037f4
|
7
|
+
data.tar.gz: 490d0958520560087668555b95e91d4188a068a32ab87f9d02d21924da843b9108da9cac3d558b36314705344737a4271a537ce66535f441030a240a6e02747a
|
@@ -113,8 +113,8 @@ module GraphQL
|
|
113
113
|
# Selections are merged in place, not copied.
|
114
114
|
def deep_merge_node(new_parent, merge_self: true)
|
115
115
|
if merge_self
|
116
|
-
@ast_nodes
|
117
|
-
@definitions
|
116
|
+
@ast_nodes |= new_parent.ast_nodes
|
117
|
+
@definitions |= new_parent.definitions
|
118
118
|
end
|
119
119
|
new_parent.scoped_children.each do |obj_type, new_fields|
|
120
120
|
prev_fields = @scoped_children[obj_type]
|
data/lib/graphql/version.rb
CHANGED
@@ -6,6 +6,7 @@ describe GraphQL::InternalRepresentation::Rewrite do
|
|
6
6
|
GraphQL::Schema.from_definition <<-GRAPHQL
|
7
7
|
type Query {
|
8
8
|
plant(id: ID!): Plant
|
9
|
+
fruit(id: ID!): [Fruit!]
|
9
10
|
}
|
10
11
|
|
11
12
|
union Plant = Grain | Fruit | Vegetable | Nut
|
@@ -44,7 +45,11 @@ describe GraphQL::InternalRepresentation::Rewrite do
|
|
44
45
|
habitats: [Habitat]
|
45
46
|
}
|
46
47
|
|
47
|
-
|
48
|
+
interface Environ {
|
49
|
+
seasons: [String]
|
50
|
+
}
|
51
|
+
|
52
|
+
type Habitat implements Environ {
|
48
53
|
residentName: String!
|
49
54
|
averageWeight: Int!
|
50
55
|
seasons: [String]
|
@@ -286,4 +291,36 @@ describe GraphQL::InternalRepresentation::Rewrite do
|
|
286
291
|
end
|
287
292
|
end
|
288
293
|
end
|
294
|
+
|
295
|
+
describe "fragment merging bug" do
|
296
|
+
let(:query_string) {
|
297
|
+
<<-GRAPHQL
|
298
|
+
{
|
299
|
+
...Frag1
|
300
|
+
__type(name: "Query") {
|
301
|
+
...Frag2
|
302
|
+
}
|
303
|
+
}
|
304
|
+
|
305
|
+
fragment Frag1 on Query {
|
306
|
+
__type(name: "Query") {
|
307
|
+
...Frag2
|
308
|
+
}
|
309
|
+
}
|
310
|
+
|
311
|
+
fragment Frag2 on __Type {
|
312
|
+
__typename
|
313
|
+
}
|
314
|
+
GRAPHQL
|
315
|
+
}
|
316
|
+
|
317
|
+
it "finishes" do
|
318
|
+
doc = rewrite_result[nil]
|
319
|
+
type_node = doc.typed_children[schema.types["Query"]]["__type"]
|
320
|
+
typename_node = type_node.typed_children[schema.types["__Type"]]["__typename"]
|
321
|
+
assert_equal 1, typename_node.ast_nodes.size
|
322
|
+
assert_equal 15, typename_node.ast_node.line
|
323
|
+
assert_equal 9, typename_node.ast_node.col
|
324
|
+
end
|
325
|
+
end
|
289
326
|
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.5.7
|
4
|
+
version: 1.5.7.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-
|
11
|
+
date: 2017-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|