Skip to content
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

Formatting #162

Merged
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
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
Loading