diff --git a/Examples/HelloWorld/Package.resolved b/Examples/HelloWorld/Package.resolved index 91453ab..5ac664f 100644 --- a/Examples/HelloWorld/Package.resolved +++ b/Examples/HelloWorld/Package.resolved @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/GraphQLSwift/GraphQL.git", "state" : { - "revision" : "397c0f43a1eb6a401858f896263288375efcf0bd", - "version" : "4.1.0" + "revision" : "2d27d8f477c1112b668dff24493a2d5e0b6c5b00", + "version" : "4.2.0" } }, { diff --git a/Package.resolved b/Package.resolved index 974b38d..1a345db 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "2a0d12dffb76bc194e23d22feb1b8acb69d315f8f87b13e43ac7c7550845bf2e", + "originHash" : "23f4c21296af041e253897a11ef5c8c7191e801b1dc6fdeb321d620a64f67a69", "pins" : [ { "identity" : "async-http-client", @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/GraphQLSwift/GraphQL.git", "state" : { - "revision" : "397c0f43a1eb6a401858f896263288375efcf0bd", - "version" : "4.1.0" + "revision" : "2d27d8f477c1112b668dff24493a2d5e0b6c5b00", + "version" : "4.2.0" } }, { @@ -127,6 +127,15 @@ "version" : "1.3.0" } }, + { + "identity" : "swift-configuration", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-configuration.git", + "state" : { + "revision" : "be76c4ad929eb6c4bcaf3351799f2adf9e6848a9", + "version" : "1.2.0" + } + }, { "identity" : "swift-crypto", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 2e07807..a53b1ae 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"), - .package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.0.0"), + .package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.2.0"), .package(url: "https://github.com/GraphQLSwift/GraphQLTransportWS.git", from: "2.0.0"), .package(url: "https://github.com/GraphQLSwift/GraphQLWS.git", from: "2.0.0"), .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0"), diff --git a/Sources/GraphQLHummingbird/HTTP/GraphQLHandler+HTTP.swift b/Sources/GraphQLHummingbird/HTTP/GraphQLHandler+HTTP.swift index 496a104..3505005 100644 --- a/Sources/GraphQLHummingbird/HTTP/GraphQLHandler+HTTP.swift +++ b/Sources/GraphQLHummingbird/HTTP/GraphQLHandler+HTTP.swift @@ -149,13 +149,9 @@ extension GraphQLHandler { // https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#validation // Validate schema - do { - let schemaValidationErrors = try validateSchema(schema: schema) - guard schemaValidationErrors.isEmpty else { - return GraphQLResult(errors: schemaValidationErrors) - } - } catch { - return GraphQLResult(errors: [GraphQLError(error)]) + let schemaValidationErrors = validateSchema(schema: schema) + guard schemaValidationErrors.isEmpty else { + return GraphQLResult(errors: schemaValidationErrors) } // Validate request diff --git a/Tests/GraphQLHummingbirdTests/HTTPTests.swift b/Tests/GraphQLHummingbirdTests/HTTPTests.swift index c2e8555..86bed6f 100644 --- a/Tests/GraphQLHummingbirdTests/HTTPTests.swift +++ b/Tests/GraphQLHummingbirdTests/HTTPTests.swift @@ -285,7 +285,6 @@ struct HTTPTests { method: .get, headers: jsonGraphQLHeaders ) { response in - var body = response.body #expect(response.status == .ok) let result = try defaultJSONDecoder.decode(GraphQLResult.self, from: response.body)