Skip to content

Commit 92c5872

Browse files
Merge pull request #12 from GraphQLSwift/chore/graphql-v4.2.0
chore: Support for GraphQL v4.2.0
2 parents 38129f2 + 4cdb526 commit 92c5872

4 files changed

Lines changed: 8 additions & 12 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: 2 additions & 2 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
@@ -14,7 +14,7 @@ let package = Package(
1414
)
1515
],
1616
dependencies: [
17-
.package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.0.0"),
17+
.package(url: "https://github.com/GraphQLSwift/GraphQL.git", from: "4.2.0"),
1818
.package(url: "https://github.com/GraphQLSwift/GraphQLTransportWS.git", from: "2.0.0"),
1919
.package(url: "https://github.com/GraphQLSwift/GraphQLWS.git", from: "2.0.0"),
2020
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),

Sources/GraphQLVapor/HTTP/GraphQLHandler+HTTP.swift

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

8383
// Validate schema
84-
do {
85-
let schemaValidationErrors = try validateSchema(schema: schema)
86-
guard schemaValidationErrors.isEmpty else {
87-
return GraphQLResult(errors: schemaValidationErrors)
88-
}
89-
} catch {
90-
return GraphQLResult(errors: [GraphQLError(error)])
84+
let schemaValidationErrors = validateSchema(schema: schema)
85+
guard schemaValidationErrors.isEmpty else {
86+
return GraphQLResult(errors: schemaValidationErrors)
9187
}
9288

9389
let validationRules = GraphQL.specifiedRules + additionalValidationRules

0 commit comments

Comments
 (0)