Skip to content

Commit 8171c0e

Browse files
Merge pull request #143 from NeedleInAJayStack/feature/parse-and-print
Exposes `parse` and `print` functions
2 parents 3cf2dbc + b47c3b6 commit 8171c0e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Sources/GraphQL/Language/Parser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Given a GraphQL source, parses it into a Document.
33
* Throws GraphQLError if a syntax error is encountered.
44
*/
5-
func parse(
5+
public func parse(
66
instrumentation: Instrumentation = NoOpInstrumentation,
77
source: String,
88
noLocation: Bool = false

Sources/GraphQL/Language/Printer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22

33
/// Converts an AST into a string, using one set of reasonable
44
/// formatting rules.
5-
func print(ast: Node) -> String {
5+
public func print(ast: Node) -> String {
66
ast.printed
77
}
88

Sources/GraphQL/Subscription/EventStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ open class EventStream<Element> {
2727
-> ConcurrentEventStream<To>
2828
{
2929
let newStream = stream.mapStream(closure)
30-
return ConcurrentEventStream<To>.init(newStream)
30+
return ConcurrentEventStream<To>(newStream)
3131
}
3232
}
3333

Tests/GraphQLTests/SubscriptionTests/SimplePubSub.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import GraphQL
3535
)
3636
subscribers.append(subscriber)
3737
}
38-
return ConcurrentEventStream<T>.init(asyncStream)
38+
return ConcurrentEventStream<T>(asyncStream)
3939
}
4040
}
4141

0 commit comments

Comments
 (0)