From 2cfc1a4e8a825736e2a09a3a51638937b032ad85 Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 17 Jul 2022 16:06:21 +0300 Subject: [PATCH 01/12] Update compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 1068bf4..acf675c 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,7 @@ StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" [compat] GraphQLParser = "0.1.1" -HTTP = "0.8.17, 0.9" +HTTP = "0.8.17, 0.9, 1" JSON3 = "1.1.2" StructTypes = "1.5" julia = "1.6" From cc991e622f359e97595182e7e468a5c951eb6711 Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 17 Jul 2022 17:02:56 +0300 Subject: [PATCH 02/12] Adjust to new StatusCode handler --- test/http_execution.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/http_execution.jl b/test/http_execution.jl index 69f1670..b57157a 100644 --- a/test/http_execution.jl +++ b/test/http_execution.jl @@ -17,8 +17,8 @@ end # handle_error @test_throws ArgumentError test_error_handler(GraphQLClient.handle_error, ArgumentError("msg")) - @test_throws HTTP.StatusError test_error_handler(GraphQLClient.handle_error, HTTP.StatusError(404, HTTP.Response(404;request=HTTP.Request(), body="{}"))) - @test_throws GraphQLClient.GraphQLError test_error_handler(GraphQLClient.handle_error, HTTP.StatusError(400, HTTP.Response(400;request=HTTP.Request(), body="{}"))) + @test_throws HTTP.StatusError test_error_handler(GraphQLClient.handle_error, HTTP.StatusError(404, "POST", "", HTTP.Response(404;request=HTTP.Request(), body="{}"))) + @test_throws GraphQLClient.GraphQLError test_error_handler(GraphQLClient.handle_error, HTTP.StatusError(400, "POST", "", HTTP.Response(400;request=HTTP.Request(), body="{}"))) # handle_deserialisation_error @test_throws MethodError test_error_handler(GraphQLClient.handle_deserialisation_error, MethodError(""), "", "") From a0d7f152a5b82103ce2f648bc42c537899c5efc2 Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 17 Jul 2022 17:10:33 +0300 Subject: [PATCH 03/12] Fix subscriptions and limit compat to 1.0 --- Project.toml | 2 +- src/subscriptions.jl | 69 ++++++++++++++++++++++++++++++++++++++++++- test/subscriptions.jl | 36 +++++++++++----------- 3 files changed, 86 insertions(+), 21 deletions(-) diff --git a/Project.toml b/Project.toml index acf675c..85d2270 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,7 @@ StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" [compat] GraphQLParser = "0.1.1" -HTTP = "0.8.17, 0.9, 1" +HTTP = "1" JSON3 = "1.1.2" StructTypes = "1.5" julia = "1.6" diff --git a/src/subscriptions.jl b/src/subscriptions.jl index 87e1d90..a94995d 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -1,5 +1,17 @@ const subscription_tracker = Ref{Dict}(Dict()) +function writews(ws::HTTP.WebSockets.WebSocket, msg) + if isdefined(HTTP, :send) + HTTP.send(ws, msg) + else + write(ws, msg) + end +end + +function writews(ws::IO, msg) + write(ws, msg) +end + """ open_subscription(fn::Function, [client::Client], @@ -97,7 +109,7 @@ function open_subscription(fn::Function, HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers) do ws # Start sub output_info(verbose) && println("Starting $(get_name(subscription_name)) subscription with ID $sub_id") - write(ws, message_str) + writews(ws, message_str) subscription_tracker[][sub_id] = "open" # Init function @@ -172,6 +184,25 @@ function async_reader_with_timeout(io::IO, subtimeout)::Channel return ch end + +function async_reader_with_timeout(ws::HTTP.WebSocket, subtimeout)::Channel + ch = Channel(1) + task = @async begin + reader_task = current_task() + function timeout_cb(timer) + put!(ch, :timeout) + Base.throwto(reader_task, InterruptException()) + end + timeout = Timer(timeout_cb, subtimeout) + data = HTTP.receive(ws) + subtimeout > 0 && close(timeout) # Cancel the timeout + put!(ch, data) + end + bind(ch, task) + return ch +end + + function async_reader_with_stopfn(io::IO, stopfn, checktime)::Channel ch = Channel(1) # Could we make this channel concretely typed? task = @async begin @@ -193,6 +224,28 @@ function async_reader_with_stopfn(io::IO, stopfn, checktime)::Channel return ch end +function async_reader_with_stopfn(ws::HTTP.WebSockets.WebSocket, stopfn, checktime)::Channel + ch = Channel(1) # Could we make this channel concretely typed? + task = @async begin + reader_task = current_task() + function timeout_cb(timer) + if stopfn() + put!(ch, :stopfn) + Base.throwto(reader_task, InterruptException()) + else + timeout = Timer(timeout_cb, checktime) + end + end + timeout = Timer(timeout_cb, checktime) + data = HTTP.WebSockets.receive(ws) + close(timeout) # Cancel the timeout + put!(ch, data) + end + bind(ch, task) + return ch +end + + """ readfromwebsocket(ws::IO, stopfn, subtimeout) @@ -221,4 +274,18 @@ function readfromwebsocket(ws::IO, stopfn, subtimeout) data = readavailable(ws) end return data +end + +function readfromwebsocket(ws::HTTP.WebSockets.WebSocket, stopfn, subtimeout) + if isnothing(stopfn) && subtimeout > 0 + ch_out = async_reader_with_timeout(ws, subtimeout) + data = take!(ch_out) + elseif !isnothing(stopfn) + checktime = subtimeout > 0 ? subtimeout : 2 + ch_out = async_reader_with_stopfn(ws, stopfn, checktime) + data = take!(ch_out) + else + data = HTTP.receive(ws) + end + return data end \ No newline at end of file diff --git a/test/subscriptions.jl b/test/subscriptions.jl index 7db8f5a..a844c3d 100644 --- a/test/subscriptions.jl +++ b/test/subscriptions.jl @@ -1,10 +1,9 @@ function listen_localhost() @async HTTP.listen(HTTP.Sockets.localhost, 8080) do http - if HTTP.WebSockets.is_upgrade(http.message) + if HTTP.WebSockets.isupgrade(http.message) HTTP.WebSockets.upgrade(http) do ws - while !eof(ws) - data = readavailable(ws) - write(ws, data) + for data in ws + GraphQLClient.writews(ws, data) end end end @@ -13,10 +12,10 @@ end function do_nothing_localhost() @async HTTP.listen(HTTP.Sockets.localhost, 8081) do http - if HTTP.WebSockets.is_upgrade(http.message) + if HTTP.WebSockets.isupgrade(http.message) HTTP.WebSockets.upgrade(http) do ws - while !eof(ws) - data = readavailable(ws) + for data in ws + nothing; end end end @@ -31,7 +30,7 @@ end @test take!(ch) == :timeout ch = GraphQLClient.async_reader_with_timeout(ws, 5) - write(ws, "Data") + GraphQLClient.writews(ws, "Data") @test String(take!(ch)) == "Data" # stopfn @@ -44,11 +43,11 @@ end @test take!(ch) == :stopfn stop[] = false ch = GraphQLClient.async_reader_with_stopfn(ws, stopfn, 0.5) - write(ws, "Data") + GraphQLClient.writews(ws, "Data") @test String(take!(ch)) == "Data" # readfromwebsocket - no timeout or stopfn - write(ws, "Data") + GraphQLClient.writews(ws, "Data") @test String(GraphQLClient.readfromwebsocket(ws, nothing, 0)) == "Data" # readfromwebsocket - timeout @@ -70,10 +69,9 @@ end function send_error_localhost(message, port) @async HTTP.listen(HTTP.Sockets.localhost, port) do http - if HTTP.WebSockets.is_upgrade(http.message) + if HTTP.WebSockets.isupgrade(http.message) HTTP.WebSockets.upgrade(http) do ws - while !eof(ws) - data = readavailable(ws) + for data in ws isempty(data) && continue query = JSON3.read(data) error_payload = """ @@ -92,7 +90,7 @@ function send_error_localhost(message, port) } } """ - write(ws, error_payload) + GraphQLClient.writews(ws, error_payload) end end end @@ -101,10 +99,9 @@ end function send_data_localhost(sub_name, port) @async HTTP.listen(HTTP.Sockets.localhost, port) do http - if HTTP.WebSockets.is_upgrade(http.message) + if HTTP.WebSockets.isupgrade(http.message) HTTP.WebSockets.upgrade(http) do ws - while !eof(ws) - data = readavailable(ws) + for data in ws isempty(data) && continue query = JSON3.read(data) data_payload = """ @@ -119,7 +116,7 @@ function send_data_localhost(sub_name, port) } } """ - write(ws, data_payload) + GraphQLClient.writews(ws, data_payload) end end end @@ -148,7 +145,7 @@ end output_fields="field", subtimeout=0.1) @test val[] == 2 - +#= # Error response - not throwing port = 8093 send_error_localhost("This failed", port) @@ -208,4 +205,5 @@ end @test results[1] isa GraphQLClient.GQLResponse{Response} @test isnothing(results[1].errors) @test !isnothing(results[1].data) # No point testing content as we've coded it in the test function + =# end \ No newline at end of file From 51592fbaa2e5dfc2627445cb2cfcb0e8cddfa308 Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 17 Jul 2022 17:56:47 +0300 Subject: [PATCH 04/12] Fix tests --- src/subscriptions.jl | 12 ++++++++---- test/subscriptions.jl | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index a94995d..834e6bc 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -105,8 +105,8 @@ function open_subscription(fn::Function, "payload" => payload ) message_str = JSON3.write(message) - - HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers) do ws + throw_if_assigned = Ref{GraphQLClientException}() + HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers, suppress_close_error=false) do ws # Start sub output_info(verbose) && println("Starting $(get_name(subscription_name)) subscription with ID $sub_id") writews(ws, message_str) @@ -132,11 +132,13 @@ function open_subscription(fn::Function, output_info(verbose) && println("Subscription $sub_id stopped by the stop function supplied") break end - response = JSON3.read(data::Vector{UInt8}, GQLSubscriptionResponse{output_type}) + # Dropping typeassert as this may be string + response = JSON3.read(data, GQLSubscriptionResponse{output_type}) payload = response.payload if !isnothing(payload.errors) && !isempty(payload.errors) && throw_on_execution_error subscription_tracker[][sub_id] = "errored" - throw(GraphQLError("Error during subscription.", payload)) + throw_if_assigned[] = GraphQLError("Error during subscription.", payload) + break end # Handle multiple subs, do we need this? if response.id == string(sub_id) @@ -149,6 +151,8 @@ function open_subscription(fn::Function, end end end + # We can't throw errors from the ws handle function in HTTP 1.0, as they get digested. + isassigned(throw_if_assigned) && throw(throw_if_assigned[]) output_debug(verbose) && println("Finished. Closing subscription") subscription_tracker[][sub_id] = "closed" return diff --git a/test/subscriptions.jl b/test/subscriptions.jl index a844c3d..8af32a4 100644 --- a/test/subscriptions.jl +++ b/test/subscriptions.jl @@ -145,7 +145,7 @@ end output_fields="field", subtimeout=0.1) @test val[] == 2 -#= + # Error response - not throwing port = 8093 send_error_localhost("This failed", port) @@ -205,5 +205,5 @@ end @test results[1] isa GraphQLClient.GQLResponse{Response} @test isnothing(results[1].errors) @test !isnothing(results[1].data) # No point testing content as we've coded it in the test function - =# + end \ No newline at end of file From c46c45d8b02cfec23c583a0b08a137d8064097aa Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 17 Jul 2022 17:58:16 +0300 Subject: [PATCH 05/12] Ooops --- src/subscriptions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index 834e6bc..772cc7a 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -105,7 +105,7 @@ function open_subscription(fn::Function, "payload" => payload ) message_str = JSON3.write(message) - throw_if_assigned = Ref{GraphQLClientException}() + throw_if_assigned = Ref{GraphQLError}() HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers, suppress_close_error=false) do ws # Start sub output_info(verbose) && println("Starting $(get_name(subscription_name)) subscription with ID $sub_id") From ef88af4ca6b6ef632f2219c63fa059478aaeb02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A0=CE=B1=CE=BD=CE=B1=CE=B3=CE=B9=CF=8E=CF=84=CE=B7?= =?UTF-8?q?=CF=82=20=CE=93=CE=B5=CF=89=CF=81=CE=B3=CE=B1=CE=BA=CF=8C=CF=80?= =?UTF-8?q?=CE=BF=CF=85=CE=BB=CE=BF=CF=82?= Date: Sun, 17 Jul 2022 19:17:29 +0300 Subject: [PATCH 06/12] Update src/subscriptions.jl Co-authored-by: Mal Miller <59854849+mmiller-max@users.noreply.github.com> --- src/subscriptions.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index 772cc7a..33932fc 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -132,7 +132,6 @@ function open_subscription(fn::Function, output_info(verbose) && println("Subscription $sub_id stopped by the stop function supplied") break end - # Dropping typeassert as this may be string response = JSON3.read(data, GQLSubscriptionResponse{output_type}) payload = response.payload if !isnothing(payload.errors) && !isempty(payload.errors) && throw_on_execution_error From 8d128b51b957a68e2bef1563292c061386471a40 Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 28 Aug 2022 19:15:07 +0300 Subject: [PATCH 07/12] Simplify PR --- src/subscriptions.jl | 70 ++----------------------------------------- test/subscriptions.jl | 14 ++++----- 2 files changed, 9 insertions(+), 75 deletions(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index 33932fc..d658629 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -1,17 +1,5 @@ const subscription_tracker = Ref{Dict}(Dict()) -function writews(ws::HTTP.WebSockets.WebSocket, msg) - if isdefined(HTTP, :send) - HTTP.send(ws, msg) - else - write(ws, msg) - end -end - -function writews(ws::IO, msg) - write(ws, msg) -end - """ open_subscription(fn::Function, [client::Client], @@ -109,7 +97,7 @@ function open_subscription(fn::Function, HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers, suppress_close_error=false) do ws # Start sub output_info(verbose) && println("Starting $(get_name(subscription_name)) subscription with ID $sub_id") - writews(ws, message_str) + HTTP.send(ws, message_str) subscription_tracker[][sub_id] = "open" # Init function @@ -170,24 +158,6 @@ function clear_subscriptions() end end -function async_reader_with_timeout(io::IO, subtimeout)::Channel - ch = Channel(1) - task = @async begin - reader_task = current_task() - function timeout_cb(timer) - put!(ch, :timeout) - Base.throwto(reader_task, InterruptException()) - end - timeout = Timer(timeout_cb, subtimeout) - data = readavailable(io) - subtimeout > 0 && close(timeout) # Cancel the timeout - put!(ch, data) - end - bind(ch, task) - return ch -end - - function async_reader_with_timeout(ws::HTTP.WebSocket, subtimeout)::Channel ch = Channel(1) task = @async begin @@ -205,28 +175,6 @@ function async_reader_with_timeout(ws::HTTP.WebSocket, subtimeout)::Channel return ch end - -function async_reader_with_stopfn(io::IO, stopfn, checktime)::Channel - ch = Channel(1) # Could we make this channel concretely typed? - task = @async begin - reader_task = current_task() - function timeout_cb(timer) - if stopfn() - put!(ch, :stopfn) - Base.throwto(reader_task, InterruptException()) - else - timeout = Timer(timeout_cb, checktime) - end - end - timeout = Timer(timeout_cb, checktime) - data = readavailable(io) - close(timeout) # Cancel the timeout - put!(ch, data) - end - bind(ch, task) - return ch -end - function async_reader_with_stopfn(ws::HTTP.WebSockets.WebSocket, stopfn, checktime)::Channel ch = Channel(1) # Could we make this channel concretely typed? task = @async begin @@ -265,20 +213,6 @@ A channel is returned with the data. If `stopfn` stops the websocket, the data will be `:stopfn`. If the timeout stops the websocket, the data will be `:timeout` """ -function readfromwebsocket(ws::IO, stopfn, subtimeout) - if isnothing(stopfn) && subtimeout > 0 - ch_out = async_reader_with_timeout(ws, subtimeout) - data = take!(ch_out) - elseif !isnothing(stopfn) - checktime = subtimeout > 0 ? subtimeout : 2 - ch_out = async_reader_with_stopfn(ws, stopfn, checktime) - data = take!(ch_out) - else - data = readavailable(ws) - end - return data -end - function readfromwebsocket(ws::HTTP.WebSockets.WebSocket, stopfn, subtimeout) if isnothing(stopfn) && subtimeout > 0 ch_out = async_reader_with_timeout(ws, subtimeout) @@ -291,4 +225,4 @@ function readfromwebsocket(ws::HTTP.WebSockets.WebSocket, stopfn, subtimeout) data = HTTP.receive(ws) end return data -end \ No newline at end of file +end diff --git a/test/subscriptions.jl b/test/subscriptions.jl index 8af32a4..db34679 100644 --- a/test/subscriptions.jl +++ b/test/subscriptions.jl @@ -3,7 +3,7 @@ function listen_localhost() if HTTP.WebSockets.isupgrade(http.message) HTTP.WebSockets.upgrade(http) do ws for data in ws - GraphQLClient.writews(ws, data) + HTTP.send(ws, data) end end end @@ -30,7 +30,7 @@ end @test take!(ch) == :timeout ch = GraphQLClient.async_reader_with_timeout(ws, 5) - GraphQLClient.writews(ws, "Data") + HTTP.send(ws, "Data") @test String(take!(ch)) == "Data" # stopfn @@ -43,11 +43,11 @@ end @test take!(ch) == :stopfn stop[] = false ch = GraphQLClient.async_reader_with_stopfn(ws, stopfn, 0.5) - GraphQLClient.writews(ws, "Data") + HTTP.send(ws, "Data") @test String(take!(ch)) == "Data" # readfromwebsocket - no timeout or stopfn - GraphQLClient.writews(ws, "Data") + HTTP.send(ws, "Data") @test String(GraphQLClient.readfromwebsocket(ws, nothing, 0)) == "Data" # readfromwebsocket - timeout @@ -90,7 +90,7 @@ function send_error_localhost(message, port) } } """ - GraphQLClient.writews(ws, error_payload) + HTTP.send(ws, error_payload) end end end @@ -116,7 +116,7 @@ function send_data_localhost(sub_name, port) } } """ - GraphQLClient.writews(ws, data_payload) + HTTP.send(ws, data_payload) end end end @@ -206,4 +206,4 @@ end @test isnothing(results[1].errors) @test !isnothing(results[1].data) # No point testing content as we've coded it in the test function -end \ No newline at end of file +end From 4415375fcf65deef0e282a10ae0cf9b2ef389c3c Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Sun, 28 Aug 2022 19:20:00 +0300 Subject: [PATCH 08/12] remove ws --- src/subscriptions.jl | 1 - test/subscriptions.jl | 1 - 2 files changed, 2 deletions(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index d658629..650809c 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -196,7 +196,6 @@ function async_reader_with_stopfn(ws::HTTP.WebSockets.WebSocket, stopfn, checkti return ch end - """ readfromwebsocket(ws::IO, stopfn, subtimeout) diff --git a/test/subscriptions.jl b/test/subscriptions.jl index db34679..eb71cdf 100644 --- a/test/subscriptions.jl +++ b/test/subscriptions.jl @@ -205,5 +205,4 @@ end @test results[1] isa GraphQLClient.GQLResponse{Response} @test isnothing(results[1].errors) @test !isnothing(results[1].data) # No point testing content as we've coded it in the test function - end From 02057a6c914fe242faddedb5149c320167984c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A0=CE=B1=CE=BD=CE=B1=CE=B3=CE=B9=CF=8E=CF=84=CE=B7?= =?UTF-8?q?=CF=82=20=CE=93=CE=B5=CF=89=CF=81=CE=B3=CE=B1=CE=BA=CF=8C=CF=80?= =?UTF-8?q?=CE=BF=CF=85=CE=BB=CE=BF=CF=82?= Date: Fri, 14 Oct 2022 10:34:41 +0300 Subject: [PATCH 09/12] docs: clarify HTTP refers to HTTP.jl Co-authored-by: Mal Miller <59854849+mmiller-max@users.noreply.github.com> --- src/subscriptions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index 650809c..0686916 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -138,7 +138,7 @@ function open_subscription(fn::Function, end end end - # We can't throw errors from the ws handle function in HTTP 1.0, as they get digested. + # We can't throw errors from the ws handle function in HTTP.jl 1.0, as they get digested. isassigned(throw_if_assigned) && throw(throw_if_assigned[]) output_debug(verbose) && println("Finished. Closing subscription") subscription_tracker[][sub_id] = "closed" From 3601968a203adbdeee375daec6e314009f0f290b Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Mon, 17 Oct 2022 17:33:28 +0000 Subject: [PATCH 10/12] chore: remove unused default --- src/subscriptions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index 0686916..e73d5e9 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -94,7 +94,7 @@ function open_subscription(fn::Function, ) message_str = JSON3.write(message) throw_if_assigned = Ref{GraphQLError}() - HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers, suppress_close_error=false) do ws + HTTP.WebSockets.open(client.ws_endpoint; retry=retry, headers=client.headers) do ws # Start sub output_info(verbose) && println("Starting $(get_name(subscription_name)) subscription with ID $sub_id") HTTP.send(ws, message_str) From 8ef4f6a81735a137267278ff824a76d0daf7ca8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A0=CE=B1=CE=BD=CE=B1=CE=B3=CE=B9=CF=8E=CF=84=CE=B7?= =?UTF-8?q?=CF=82=20=CE=93=CE=B5=CF=89=CF=81=CE=B3=CE=B1=CE=BA=CF=8C=CF=80?= =?UTF-8?q?=CE=BF=CF=85=CE=BB=CE=BF=CF=82?= Date: Mon, 17 Oct 2022 20:43:39 +0300 Subject: [PATCH 11/12] chore: update type for consistency --- src/subscriptions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subscriptions.jl b/src/subscriptions.jl index e73d5e9..d19fe0f 100644 --- a/src/subscriptions.jl +++ b/src/subscriptions.jl @@ -158,7 +158,7 @@ function clear_subscriptions() end end -function async_reader_with_timeout(ws::HTTP.WebSocket, subtimeout)::Channel +function async_reader_with_timeout(ws::HTTP.WebSockets.WebSocket, subtimeout)::Channel ch = Channel(1) task = @async begin reader_task = current_task() From 61fa4764d7b7ac1967265f9ea3dd4522fca17005 Mon Sep 17 00:00:00 2001 From: Panagiotis Georgakopoulos Date: Mon, 17 Oct 2022 18:23:10 +0000 Subject: [PATCH 12/12] bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 85d2270..335961e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "GraphQLClient" uuid = "09d831e3-9c21-47a9-bfd8-076871817219" -version = "0.7.5" +version = "0.7.6" [deps] GraphQLParser = "0ae10fbf-af58-4883-b66b-ff0ac82d20dd"