Skip to content

Commit

Permalink
Merge pull request #140 from NeedleInAJayStack/fix/warnings
Browse files Browse the repository at this point in the history
Fixes compiler warnings
  • Loading branch information
NeedleInAJayStack authored Mar 19, 2024
2 parents 0fee9b5 + 40d176f commit 63c74fa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit 63c74fa

Please sign in to comment.