Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Commit eaf99a5

Browse files
committed
Adjust parameters to match GraphQLClient
1 parent ae62b8a commit eaf99a5

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Runtime/SimpleGraphQL/GraphQLClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public async Task<bool> Subscribe(
156156
if (!HttpUtils.IsWebSocketReady())
157157
{
158158
// Prepare the socket before continuing.
159-
await HttpUtils.WebSocketConnect(Endpoint, protocol, headers, authToken, authScheme);
159+
await HttpUtils.WebSocketConnect(Endpoint, headers, authToken, authScheme, protocol);
160160
}
161161

162162
return await HttpUtils.WebSocketSubscribe(request.Query.ToMurmur2Hash().ToString(), request);
@@ -199,7 +199,7 @@ public async Task<bool> Subscribe(
199199
if (!HttpUtils.IsWebSocketReady())
200200
{
201201
// Prepare the socket before continuing.
202-
await HttpUtils.WebSocketConnect(Endpoint, protocol, headers, authToken, authScheme);
202+
await HttpUtils.WebSocketConnect(Endpoint, headers, authToken, authScheme, protocol);
203203
}
204204

205205
return await HttpUtils.WebSocketSubscribe(id, request);

Runtime/SimpleGraphQL/HttpUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ public static bool IsWebSocketReady() =>
126126
/// <returns></returns>
127127
public static async Task WebSocketConnect(
128128
string url,
129-
string protocol = "graphql-ws",
130129
Dictionary<string, string> headers = null,
131130
string authToken = null,
132-
string authScheme = null
131+
string authScheme = null,
132+
string protocol = "graphql-ws"
133133
)
134134
{
135135
url = url.Replace("http", "ws");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.lastabyss.simplegraphql",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"displayName": "SimpleGraphQL",
55
"description": "A simple graphQL client that allows one to use .graphql files (or code) for queries, mutations, and subscriptions with Unity.",
66
"unity": "2019.4",

0 commit comments

Comments
 (0)