@@ -21,7 +21,7 @@ Feature: GraphQL introspection support
21
21
When I send the following GraphQL request:
22
22
"""
23
23
{
24
- type1: __type(name: "DummyProductItem ") {
24
+ type1: __type(name: "DummyProduct ") {
25
25
description,
26
26
fields {
27
27
name
@@ -35,7 +35,7 @@ Feature: GraphQL introspection support
35
35
}
36
36
}
37
37
}
38
- type2: __type(name: "DummyAggregateOfferItemConnection ") {
38
+ type2: __type(name: "DummyAggregateOfferConnection ") {
39
39
description,
40
40
fields {
41
41
name
@@ -49,7 +49,7 @@ Feature: GraphQL introspection support
49
49
}
50
50
}
51
51
}
52
- type3: __type(name: "DummyAggregateOfferItemEdge ") {
52
+ type3: __type(name: "DummyAggregateOfferEdge ") {
53
53
description,
54
54
fields {
55
55
name
@@ -69,12 +69,53 @@ Feature: GraphQL introspection support
69
69
And the response should be in JSON
70
70
And the header "Content-Type" should be equal to "application/json"
71
71
And the JSON node "data.type1.description" should be equal to "Dummy Product."
72
- And the JSON node "data.type1.fields[1].type.name" should be equal to "DummyAggregateOfferItemConnection "
72
+ And the JSON node "data.type1.fields[1].type.name" should be equal to "DummyAggregateOfferConnection "
73
73
And the JSON node "data.type2.fields[0].name" should be equal to "edges"
74
- And the JSON node "data.type2.fields[0].type.ofType.name" should be equal to "DummyAggregateOfferItemEdge "
74
+ And the JSON node "data.type2.fields[0].type.ofType.name" should be equal to "DummyAggregateOfferEdge "
75
75
And the JSON node "data.type3.fields[0].name" should be equal to "node"
76
76
And the JSON node "data.type3.fields[1].name" should be equal to "cursor"
77
- And the JSON node "data.type3.fields[0].type.name" should be equal to "DummyAggregateOfferItem"
77
+ And the JSON node "data.type3.fields[0].type.name" should be equal to "DummyAggregateOffer"
78
+
79
+ Scenario : Introspect types with different serialization groups for item_query and collection_query
80
+ When I send the following GraphQL request:
81
+ """
82
+ {
83
+ type1: __type(name: "DummyDifferentGraphQlSerializationGroupCollection") {
84
+ description,
85
+ fields {
86
+ name
87
+ type {
88
+ name
89
+ kind
90
+ ofType {
91
+ name
92
+ kind
93
+ }
94
+ }
95
+ }
96
+ }
97
+ type2: __type(name: "DummyDifferentGraphQlSerializationGroupItem") {
98
+ description,
99
+ fields {
100
+ name
101
+ type {
102
+ name
103
+ kind
104
+ ofType {
105
+ name
106
+ kind
107
+ }
108
+ }
109
+ }
110
+ }
111
+ }
112
+ """
113
+ Then the response status code should be 200
114
+ And the response should be in JSON
115
+ And the header "Content-Type" should be equal to "application/json"
116
+ And the JSON node "data.type1.description" should be equal to "Dummy with different serialization groups for item_query and collection_query."
117
+ And the JSON node "data.type1.fields[3].name" should not exist
118
+ And the JSON node "data.type2.fields[3].name" should be equal to "title"
78
119
79
120
Scenario : Introspect deprecated queries
80
121
When I send the following GraphQL request:
@@ -121,7 +162,7 @@ Feature: GraphQL introspection support
121
162
When I send the following GraphQL request:
122
163
"""
123
164
{
124
- __type(name: "DeprecatedResourceItem ") {
165
+ __type(name: "DeprecatedResource ") {
125
166
fields(includeDeprecated: true) {
126
167
name
127
168
isDeprecated
@@ -224,7 +265,7 @@ Feature: GraphQL introspection support
224
265
When I send the following GraphQL request:
225
266
"""
226
267
{
227
- __type(name: "DummyItem ") {
268
+ __type(name: "Dummy ") {
228
269
description,
229
270
fields {
230
271
name
@@ -250,7 +291,7 @@ Feature: GraphQL introspection support
250
291
When I send the following GraphQL request:
251
292
"""
252
293
{
253
- typeQuery: __type(name: "DummyGroupItem ") {
294
+ typeQuery: __type(name: "DummyGroup ") {
254
295
description,
255
296
fields {
256
297
name
@@ -390,7 +431,7 @@ Feature: GraphQL introspection support
390
431
When I send the following GraphQL request:
391
432
"""
392
433
{
393
- dummyItem : dummy(id: "/dummies/3") {
434
+ dummy : dummy(id: "/dummies/3") {
394
435
name
395
436
relatedDummy {
396
437
id
@@ -403,6 +444,6 @@ Feature: GraphQL introspection support
403
444
Then the response status code should be 200
404
445
And the response should be in JSON
405
446
And the header "Content-Type" should be equal to "application/json"
406
- And the JSON node "data.dummyItem .name" should be equal to "Dummy #3"
407
- And the JSON node "data.dummyItem .relatedDummy.name" should be equal to "RelatedDummy #3"
408
- And the JSON node "data.dummyItem .relatedDummy.__typename" should be equal to "RelatedDummyItem "
447
+ And the JSON node "data.dummy .name" should be equal to "Dummy #3"
448
+ And the JSON node "data.dummy .relatedDummy.name" should be equal to "RelatedDummy #3"
449
+ And the JSON node "data.dummy .relatedDummy.__typename" should be equal to "RelatedDummy "
0 commit comments