Skip to content

Commit 2a2d04e

Browse files
Merge pull request #19 from GraphQLSwift/chore/graphql-v4.2.0
chore: Support for GraphQL v4.2.0
2 parents 24879fa + 814e485 commit 2a2d04e

5 files changed

Lines changed: 18 additions & 14 deletions

File tree

Examples/HelloWorld/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.resolved

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let package = Package(
1515
],
1616
dependencies: [
1717
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
18-
.package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.0.0"),
18+
.package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.2.0"),
1919
.package(url: "https://github.com/GraphQLSwift/GraphQLTransportWS.git", from: "2.0.0"),
2020
.package(url: "https://github.com/GraphQLSwift/GraphQLWS.git", from: "2.0.0"),
2121
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"),

Sources/GraphQLHummingbird/HTTP/GraphQLHandler+HTTP.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,9 @@ extension GraphQLHandler {
149149
// https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#validation
150150

151151
// Validate schema
152-
do {
153-
let schemaValidationErrors = try validateSchema(schema: schema)
154-
guard schemaValidationErrors.isEmpty else {
155-
return GraphQLResult(errors: schemaValidationErrors)
156-
}
157-
} catch {
158-
return GraphQLResult(errors: [GraphQLError(error)])
152+
let schemaValidationErrors = validateSchema(schema: schema)
153+
guard schemaValidationErrors.isEmpty else {
154+
return GraphQLResult(errors: schemaValidationErrors)
159155
}
160156

161157
// Validate request

Tests/GraphQLHummingbirdTests/HTTPTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ struct HTTPTests {
285285
method: .get,
286286
headers: jsonGraphQLHeaders
287287
) { response in
288-
var body = response.body
289288
#expect(response.status == .ok)
290289

291290
let result = try defaultJSONDecoder.decode(GraphQLResult.self, from: response.body)

0 commit comments

Comments
 (0)