Skip to content

Commit 5050078

Browse files
Merge pull request #1 from GraphQLSwift/fix/PublicInits
TokenInitPayload gets public init
2 parents e0f2a9e + 569a110 commit 5050078

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/test.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: test
2+
on:
3+
pull_request:
4+
push: { branches: [ main ] }
5+
6+
jobs:
7+
test:
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest, macos-latest]
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- uses: fwal/setup-swift@v1
14+
- uses: actions/checkout@v2
15+
- name: Run tests
16+
run: swift test

Sources/GraphQLTransportWS/InitPayloads.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ public struct EmptyInitPayload: Equatable & Codable { }
55

66
/// `connection_init` `payload` that includes an `authToken` field
77
public struct TokenInitPayload: Equatable & Codable {
8-
let authToken: String
8+
public let authToken: String
9+
10+
public init(authToken: String) {
11+
self.authToken = authToken
12+
}
913
}

0 commit comments

Comments
 (0)