Skip to content

Commit 07980c1

Browse files
antograssiotalanpoulain
authored andcommitted
Add webonyx/graphql-php version 0.13 compatibility (#2350)
* Fix webonyx/graphql-php version compatibility Restore debugging feature in GraphQL * Remove legacy annotations
1 parent 47e8dfb commit 07980c1

20 files changed

+97
-70
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
],
1515
"require": {
1616
"php": ">=7.1",
17-
1817
"doctrine/inflector": "^1.0",
1918
"psr/cache": "^1.0",
2019
"psr/container": "^1.0",
@@ -66,7 +65,7 @@
6665
"symfony/validator": "^3.3 || ^4.0",
6766
"symfony/web-profiler-bundle": "^3.3 || ^4.0",
6867
"symfony/yaml": "^3.3 || ^4.0",
69-
"webonyx/graphql-php": ">=0.12 <1.0"
68+
"webonyx/graphql-php": ">=0.13 <1.0"
7069
},
7170
"conflict": {
7271
"symfony/dependency-injection": "<3.4"

features/graphql/introspection.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ Feature: GraphQL introspection support
310310
And the JSON node "data.typeCreatePayload.fields[2].name" should be equal to "baz"
311311
And the JSON node "data.typeCreatePayload.fields[3].name" should be equal to "clientMutationId"
312312

313-
@dropSchema
314313
Scenario: Retrieve an item through a GraphQL query
315314
Given there are 4 dummy objects with relatedDummy
316315
When I send the following GraphQL request:

features/graphql/mutation.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ Feature: GraphQL mutation support
122122
And the JSON node "data.deleteFoo.id" should be equal to "/foos/1"
123123
And the JSON node "data.deleteFoo.clientMutationId" should be equal to "anotherId"
124124

125-
@dropSchema
126125
Scenario: Delete an item with composite identifiers through a mutation
127126
Given there are Composite identifier objects
128127
When I send the following GraphQL request:
@@ -250,7 +249,6 @@ Feature: GraphQL mutation support
250249
And the JSON node "data.createDummyGroup.baz" should be null
251250
And the JSON node "data.createDummyGroup.clientMutationId" should be equal to "myId"
252251

253-
@dropSchema
254252
Scenario: Trigger a validation error
255253
When I send the following GraphQL request:
256254
"""

features/graphql/query.feature

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ Feature: GraphQL query support
138138
And the header "Content-Type" should be equal to "application/json"
139139
And the JSON node "data.dummy._id" should be equal to "1"
140140

141-
@dropSchema
142141
Scenario: Retrieve an nonexistent item through a GraphQL query
143142
When I send the following GraphQL request:
144143
"""
@@ -152,3 +151,63 @@ Feature: GraphQL query support
152151
And the response should be in JSON
153152
And the header "Content-Type" should be equal to "application/json"
154153
And the JSON node "data.dummy" should be null
154+
155+
Scenario: Retrieve an nonexistent IRI through a GraphQL query
156+
When I send the following GraphQL request:
157+
"""
158+
{
159+
foo(id: "/foo/1") {
160+
name
161+
}
162+
}
163+
"""
164+
Then the response status code should be 200
165+
And the response should be in JSON
166+
And the header "Content-Type" should be equal to "application/json"
167+
And the JSON node "errors[0].debugMessage" should be equal to 'No route matches "/foo/1".'
168+
And the JSON should be valid according to this schema:
169+
"""
170+
{
171+
"type": "object",
172+
"properties": {
173+
"errors": {
174+
"type": "array",
175+
"items": {
176+
"type": "object",
177+
"properties": {
178+
"debugMessage": {"type": "string"},
179+
"message": {"type": "string"},
180+
"extensions": {"type": "object"},
181+
"locations": {"type": "array"},
182+
"path": {"type": "array"},
183+
"trace": {
184+
"type": "array",
185+
"items": {
186+
"type": "object",
187+
"properties": {
188+
"file": {"type": "string"},
189+
"line": {"type": "integer"},
190+
"call": {"type": ["string", "null"]},
191+
"function": {"type": ["string", "null"]}
192+
},
193+
"additionalProperties": false
194+
},
195+
"minItems": 1
196+
}
197+
},
198+
"required": [
199+
"debugMessage",
200+
"message",
201+
"extensions",
202+
"locations",
203+
"path",
204+
"trace"
205+
],
206+
"additionalProperties": false
207+
},
208+
"minItems": 1,
209+
"maxItems": 1
210+
}
211+
}
212+
}
213+
"""

features/hal/collection.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,6 @@ Feature: HAL Collections support
808808
}
809809
"""
810810

811-
@dropSchema
812811
Scenario: Allow passing 0 to `itemsPerPage`
813812
When I add "Accept" header equal to "application/hal+json"
814813
And I send a "GET" request to "/dummies?itemsPerPage=0"

features/hal/max_depth.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ Feature: Max depth handling
9191
}
9292
"""
9393

94-
@dropSchema
9594
Scenario: Add a 2nd level of descendants when eager fetching is disabled
9695
Given there is a max depth dummy with 1 level of descendants
9796
When I add "Accept" header equal to "application/hal+json"

features/jsonld/max_depth.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Feature: Max depth handling
3535
}
3636
"""
3737

38-
@dropSchema
3938
Scenario: Add a 2nd level of descendants
4039
When I add "Content-Type" header equal to "application/ld+json"
4140
And I send a "PUT" request to "max_depth_eager_dummies/1" with body:

features/main/exposed_state.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Feature: Expose persisted object state
2525
}
2626
"""
2727

28-
@dropSchema
2928
Scenario: Update a resource with truncable value value should return the correct object state
3029
When I add "Content-Type" header equal to "application/ld+json"
3130
And I send a "PUT" request to "/truncated_dummies/1" with body:

features/main/operation.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Feature: Operation support
1414
"""
1515

1616
@createSchema
17-
@dropSchema
1817
Scenario: Select a resource and it's embedded data
1918
Given there are 1 embedded dummy objects
2019
When I send a "GET" request to "/embedded_dummies_groups/1"

features/main/relation.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,6 @@ Feature: Relations support
555555
}
556556
"""
557557

558-
@dropSchema
559558
Scenario: Passing an invalid IRI to a relation
560559
When I add "Content-Type" header equal to "application/ld+json"
561560
And I send a "POST" request to "/relation_embedders" with body:
@@ -569,7 +568,6 @@ Feature: Relations support
569568
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
570569
And the JSON node "hydra:description" should contain "Invalid value provided (invalid IRI?)."
571570

572-
@dropSchema
573571
Scenario: Passing an invalid type to a relation
574572
When I add "Content-Type" header equal to "application/ld+json"
575573
And I send a "POST" request to "/relation_embedders" with body:

0 commit comments

Comments
 (0)