Skip to content

Commit 86ec849

Browse files
williambaileypaulofaria
authored andcommitted
Expose more of the API as public (#18)
1 parent 2aa8e9f commit 86ec849

File tree

8 files changed

+281
-281
lines changed

8 files changed

+281
-281
lines changed

Sources/GraphQL/Error/GraphQLError.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public struct GraphQLError : Error {
1111
*
1212
* Appears in the result of `description`.
1313
*/
14-
let message: String
14+
public let message: String
1515

1616
/**
1717
* An array of (line: Int, column: Int) locations within the source GraphQL document
@@ -23,36 +23,36 @@ public struct GraphQLError : Error {
2323
*
2424
* Appears in the result of `description`.
2525
*/
26-
let locations: [SourceLocation]
26+
public let locations: [SourceLocation]
2727

2828
/**
2929
* An array describing the index path into the execution response which
3030
* corresponds to this error. Only included for errors during execution.
3131
*
3232
* Appears in the result of `description`.
3333
*/
34-
let path: [IndexPathElement]
34+
public let path: [IndexPathElement]
3535

3636
/**
3737
* An array of GraphQL AST Nodes corresponding to this error.
3838
*/
39-
let nodes: [Node]
39+
public let nodes: [Node]
4040

4141
/**
4242
* The source GraphQL document corresponding to this error.
4343
*/
44-
let source: Source?
44+
public let source: Source?
4545

4646
/**
4747
* An array of character offsets within the source GraphQL document
4848
* which correspond to this error.
4949
*/
50-
let positions: [Int]
50+
public let positions: [Int]
5151

5252
/**
5353
* The original error thrown from a field resolver during execution.
5454
*/
55-
let originalError: Error?
55+
public let originalError: Error?
5656

5757
public init(message: String, nodes: [Node] = [], source: Source? = nil, positions: [Int] = [],
5858
path: [IndexPathElement] = [], originalError: Error? = nil) {

Sources/GraphQL/Execution/Execute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public final class ExecutionContext {
4141
private var errorsSemaphore = DispatchSemaphore(value: 1)
4242
private var _errors: [GraphQLError]
4343

44-
var errors: [GraphQLError] {
44+
public var errors: [GraphQLError] {
4545
get {
4646
errorsSemaphore.wait()
4747
defer {

0 commit comments

Comments
 (0)