Skip to content

Fixes compiler warnings #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/GraphQL/Execution/Execute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public struct ConcurrentDispatchFieldExecutionStrategy: QueryFieldExecutionStrat
.mapValues { _ -> Future<Any>? in nil }
var err: Error?

fields.forEach { field in
for field in fields {
let fieldASTs = field.value
let fieldKey = field.key
let fieldPath = path.appending(fieldKey)
Expand Down
2 changes: 2 additions & 0 deletions Sources/GraphQL/Type/Directives.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import OrderedCollections

public enum DirectiveLocation: String, Encodable {
// Operations
case query = "QUERY"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ public func NoDeprecatedCustomRule(context: ValidationContext) -> Visitor {
}
}
if let node = node as? ObjectField {
let inputObjectDef = context.parentInputType as? GraphQLInputObjectType

if
let inputObjectDef = context.parentInputType as? GraphQLInputObjectType,
let inputFieldDef = inputObjectDef.fields[node.name.value],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class FieldExecutionStrategyTests: XCTestCase {
XCTAssertEqual(result.value.data, multiThrowsExpectedData)
let resultErrors = result.value.errors
XCTAssertEqual(resultErrors.count, multiThrowsExpectedErrors.count)
multiThrowsExpectedErrors.forEach { m in
for m in multiThrowsExpectedErrors {
XCTAssertTrue(resultErrors.contains(m), "Expecting result errors to contain \(m)")
}
// XCTAssertEqualWithAccuracy(1.0, result.seconds, accuracy: 0.5)
Expand Down Expand Up @@ -308,7 +308,7 @@ class FieldExecutionStrategyTests: XCTestCase {
XCTAssertEqual(result.value.data, multiThrowsExpectedData)
let resultErrors = result.value.errors
XCTAssertEqual(resultErrors.count, multiThrowsExpectedErrors.count)
multiThrowsExpectedErrors.forEach { m in
for m in multiThrowsExpectedErrors {
XCTAssertTrue(resultErrors.contains(m), "Expecting result errors to contain \(m)")
}
// XCTAssertEqualWithAccuracy(0.1, result.seconds, accuracy: 0.25)
Expand Down