@@ -9,7 +9,7 @@ public class GlobalObjectIdentificationTests : FusionTestBase
9
9
#region selections on node field
10
10
11
11
[ Fact ( Skip = "Not yet supported" ) ]
12
- public void Id_And_Typename_Selection_On_Node_Field ( )
12
+ public void Node_Field_Id_And_Typename_Selection ( )
13
13
{
14
14
// arrange
15
15
var subgraphA = new TestSubgraph (
@@ -57,7 +57,7 @@ NOT SUPPORTED
57
57
}
58
58
59
59
[ Fact ( Skip = "Not yet supported" ) ]
60
- public void Concrete_Type_On_Node_Field_Selection_Has_Dependency ( )
60
+ public void Node_Field_Concrete_Type_Has_Dependency ( )
61
61
{
62
62
// arrange
63
63
var subgraphA = new TestSubgraph (
@@ -72,12 +72,7 @@ interface Node {
72
72
73
73
type Discussion implements Node @key(fields: "id") {
74
74
id: ID!
75
- viewerRating: Float!
76
- product: Product
77
- }
78
-
79
- type Product @key(fields: "id") {
80
- id: ID!
75
+ name: String
81
76
}
82
77
""" ) ;
83
78
@@ -91,9 +86,9 @@ interface Node {
91
86
id: ID!
92
87
}
93
88
94
- type Product implements Node @key(fields: "id") {
89
+ type Discussion implements Node @key(fields: "id") {
95
90
id: ID!
96
- name: String
91
+ commentCount: Int
97
92
}
98
93
""" ) ;
99
94
@@ -107,11 +102,8 @@ type Product implements Node @key(fields: "id") {
107
102
query testQuery($id: ID!) {
108
103
node(id: $id) {
109
104
... on Discussion {
110
- id
111
- viewerRating
112
- product {
113
- name
114
- }
105
+ name
106
+ commentCount
115
107
}
116
108
}
117
109
}
@@ -126,7 +118,7 @@ NOT SUPPORTED
126
118
}
127
119
128
120
[ Fact ( Skip = "Not yet supported" ) ]
129
- public void Concrete_Type_On_Node_Field_With_Dependency ( )
121
+ public void Node_Field_Concrete_Type_Selection_Has_Dependency ( )
130
122
{
131
123
// arrange
132
124
var subgraphA = new TestSubgraph (
@@ -141,7 +133,12 @@ interface Node {
141
133
142
134
type Discussion implements Node @key(fields: "id") {
143
135
id: ID!
144
- name: String
136
+ viewerRating: Float!
137
+ product: Product
138
+ }
139
+
140
+ type Product @key(fields: "id") {
141
+ id: ID!
145
142
}
146
143
""" ) ;
147
144
@@ -155,9 +152,9 @@ interface Node {
155
152
id: ID!
156
153
}
157
154
158
- type Discussion implements Node @key(fields: "id") {
155
+ type Product implements Node @key(fields: "id") {
159
156
id: ID!
160
- commentCount: Int
157
+ name: String
161
158
}
162
159
""" ) ;
163
160
@@ -171,8 +168,11 @@ type Discussion implements Node @key(fields: "id") {
171
168
query testQuery($id: ID!) {
172
169
node(id: $id) {
173
170
... on Discussion {
174
- name
175
- commentCount
171
+ id
172
+ viewerRating
173
+ product {
174
+ name
175
+ }
176
176
}
177
177
}
178
178
}
@@ -187,7 +187,7 @@ NOT SUPPORTED
187
187
}
188
188
189
189
[ Fact ( Skip = "Not yet supported" ) ]
190
- public void Two_Concrete_Types_On_Node_Field_Selection_Has_Same_Dependency ( )
190
+ public void Node_Field_Two_Concrete_Types_Selections_Have_Same_Dependency ( )
191
191
{
192
192
// arrange
193
193
var subgraphA = new TestSubgraph (
@@ -278,7 +278,7 @@ NOT SUPPORTED
278
278
}
279
279
280
280
[ Fact ( Skip = "Not yet supported" ) ]
281
- public void Two_Concrete_Types_On_Node_Field_Selection_Has_Different_Dependency ( )
281
+ public void Node_Field_Two_Concrete_Types_Selections_Have_Different_Dependencies ( )
282
282
{
283
283
// arrange
284
284
var subgraphA = new TestSubgraph (
@@ -374,7 +374,7 @@ NOT SUPPORTED
374
374
#region interface selections on node field
375
375
376
376
[ Fact ( Skip = "Not yet supported" ) ]
377
- public void Selections_On_Interface_On_Node_Field ( )
377
+ public void Node_Field_Selections_On_Interface ( )
378
378
{
379
379
// arrange
380
380
var subgraphA = new TestSubgraph (
@@ -428,7 +428,7 @@ NOT SUPPORTED
428
428
}
429
429
430
430
[ Fact ( Skip = "Not yet supported" ) ]
431
- public void Selections_On_Interface_And_Concrete_Type_On_Node_Field ( )
431
+ public void Node_Field_Selections_On_Interface_And_Concrete_Type ( )
432
432
{
433
433
// arrange
434
434
var subgraphA = new TestSubgraph (
@@ -485,7 +485,7 @@ NOT SUPPORTED
485
485
}
486
486
487
487
[ Fact ( Skip = "Not yet supported" ) ]
488
- public void Selections_On_Interface_On_Node_Field_Interface_Selection_Has_Dependency ( )
488
+ public void Node_FIeld_Selections_On_Interface_And_Concrete_Type_Both_Have_Different_Dependencies ( )
489
489
{
490
490
// arrange
491
491
var subgraphA = new TestSubgraph (
@@ -510,6 +510,7 @@ interface ProductList {
510
510
type Item2 implements Node & ProductList @key(fields: "id") {
511
511
id: ID!
512
512
products: [Product]
513
+ singularProduct: Product
513
514
}
514
515
515
516
type Product implements Node @key(fields: "id") {
@@ -550,6 +551,11 @@ ... on ProductList {
550
551
name
551
552
}
552
553
}
554
+ ... on Item2 {
555
+ singularProduct {
556
+ name
557
+ }
558
+ }
553
559
}
554
560
}
555
561
""" ) ;
@@ -563,7 +569,7 @@ NOT SUPPORTED
563
569
}
564
570
565
571
[ Fact ( Skip = "Not yet supported" ) ]
566
- public void Selections_On_Interface_And_Concrete_Type_On_Node_Field_Interface_Selection_Has_Dependency ( )
572
+ public void Node_Field_Selections_On_Interface_Selection_Has_Dependency ( )
567
573
{
568
574
// arrange
569
575
var subgraphA = new TestSubgraph (
@@ -588,7 +594,6 @@ interface ProductList {
588
594
type Item2 implements Node & ProductList @key(fields: "id") {
589
595
id: ID!
590
596
products: [Product]
591
- singularProduct: Product
592
597
}
593
598
594
599
type Product implements Node @key(fields: "id") {
@@ -629,11 +634,6 @@ ... on ProductList {
629
634
name
630
635
}
631
636
}
632
- ... on Item2 {
633
- singularProduct {
634
- name
635
- }
636
- }
637
637
}
638
638
}
639
639
""" ) ;
0 commit comments