Skip to content

Commit

Permalink
Merge pull request #162 from NeedleInAJayStack/chore/formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
NeedleInAJayStack authored Jan 15, 2025
2 parents 5e098b3 + 44f5b07 commit 2b0db26
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Sources/GraphQL/GraphQL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ public func graphqlSubscribe(

// MARK: Async/Await

@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
/// This is the primary entry point function for fulfilling GraphQL operations
/// by parsing, validating, and executing a GraphQL document along side a
/// GraphQL schema.
Expand Down Expand Up @@ -315,6 +314,7 @@ public func graphqlSubscribe(
/// `errors` if an error occurs only in a specific field. If that happens the value of that
/// field will be `null` and there will be an error inside `errors` specifying the reason for
/// the failure and the path of the failed field.
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
public func graphql(
queryStrategy: QueryFieldExecutionStrategy = SerialFieldExecutionStrategy(),
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy(),
Expand Down Expand Up @@ -343,7 +343,6 @@ public func graphql(
).get()
}

@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
/// This is the primary entry point function for fulfilling GraphQL subscription
/// operations by parsing, validating, and executing a GraphQL subscription
/// document along side a GraphQL schema.
Expand Down Expand Up @@ -382,6 +381,7 @@ public func graphql(
/// If that happens the value of that field will be `null` and there
/// will be an error inside `errors` specifying the reason for the failure and the path of the
/// failed field.
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
public func graphqlSubscribe(
queryStrategy: QueryFieldExecutionStrategy = SerialFieldExecutionStrategy(),
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy(),
Expand Down
2 changes: 1 addition & 1 deletion Sources/GraphQL/Subscription/EventStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ open class EventStream<Element> {
}
}

@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
/// Event stream that wraps an `AsyncThrowingStream` from Swift's standard concurrency system.
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
public class ConcurrentEventStream<Element>: EventStream<Element> {
public let stream: AsyncThrowingStream<Element, Error>

Expand Down
6 changes: 1 addition & 5 deletions Sources/GraphQL/Type/Definition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,7 @@ public final class GraphQLEnumType {
try assertValid(name: name)
self.name = name
self.description = description
self.values = try defineEnumValues(
name: name,
valueMap: values
)
self.values = try defineEnumValues(valueMap: values)
self.astNode = astNode
self.extensionASTNodes = extensionASTNodes

Expand Down Expand Up @@ -969,7 +966,6 @@ extension GraphQLEnumType: Hashable {
}

func defineEnumValues(
name: String,
valueMap: GraphQLEnumValueMap
) throws -> [GraphQLEnumValueDefinition] {
var definitions: [GraphQLEnumValueDefinition] = []
Expand Down
2 changes: 1 addition & 1 deletion Tests/GraphQLTests/SubscriptionTests/SimplePubSub.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import GraphQL

@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
/// A very simple publish/subscriber used for testing
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
class SimplePubSub<T> {
private var subscribers: [Subscriber<T>]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import GraphQL
import NIO
import XCTest

@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
/// This follows the graphql-js testing, with deviations where noted.
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
class SubscriptionTests: XCTestCase {
let timeoutDuration = 0.5 // in seconds

Expand Down

0 comments on commit 2b0db26

Please sign in to comment.