Skip to content

Commit 17d069f

Browse files
committed
Consistent pluralisation of 'continuations'
1 parent 9a02803 commit 17d069f

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
elixir 1.13.3
1+
elixir 1.13.4
22
erlang 24.2.1

lib/absinthe/phoenix/channel.ex

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ defmodule Absinthe.Phoenix.Channel do
141141

142142
{{:ok, %{subscriptionId: topic}}, socket}
143143

144-
{:more, %{"subscribed" => topic}, continuation, context} ->
144+
{:more, %{"subscribed" => topic}, continuations, context} ->
145145
reply(socket_ref(socket), {:ok, %{subscriptionId: topic}})
146146

147147
pubsub_subscribe(topic, socket)
148148
socket = Absinthe.Phoenix.Socket.put_options(socket, context: context)
149149

150-
handle_subscription_continuation(continuation, topic, socket)
150+
handle_subscription_continuation(continuations, topic, socket)
151151

152152
{:noreply, socket}
153153

@@ -159,13 +159,13 @@ defmodule Absinthe.Phoenix.Channel do
159159
socket = Absinthe.Phoenix.Socket.put_options(socket, context: context)
160160
{{:error, reply}, socket}
161161

162-
{:more, %{data: _} = reply, continuation, context} ->
162+
{:more, %{data: _} = reply, continuations, context} ->
163163
id = new_query_id()
164164

165165
socket =
166166
socket
167167
|> Absinthe.Phoenix.Socket.put_options(context: context)
168-
|> handle_continuation(continuation, id)
168+
|> handle_continuation(continuations, id)
169169

170170
{{:ok, add_query_id(reply, id)}, socket}
171171

@@ -178,8 +178,8 @@ defmodule Absinthe.Phoenix.Channel do
178178
{module, fun} = pipeline
179179

180180
case Absinthe.Pipeline.run(document, apply(module, fun, [schema, options])) do
181-
{:ok, %{result: %{continuation: continuation} = result, execution: res}, _phases} ->
182-
{:more, Map.delete(result, :continuation), continuation, res.context}
181+
{:ok, %{result: %{continuations: continuations} = result, execution: res}, _phases} ->
182+
{:more, Map.delete(result, :continuations), continuations, res.context}
183183

184184
{:ok, %{result: result, execution: res}, _phases} ->
185185
{:ok, result, res.context}
@@ -215,16 +215,16 @@ defmodule Absinthe.Phoenix.Channel do
215215
|> Absinthe.Pipeline.for_document(options)
216216
end
217217

218-
defp handle_continuation(socket, continuation, id) do
219-
case Absinthe.Pipeline.continue(continuation) do
220-
{:ok, %{result: %{continuation: next_continuation} = result}, _phases} ->
218+
defp handle_continuation(socket, continuations, id) do
219+
case Absinthe.Pipeline.continue(continuations) do
220+
{:ok, %{result: %{continuation: next_continuations} = result}, _phases} ->
221221
result =
222222
result
223-
|> Map.delete(:continuation)
223+
|> Map.delete(:continuations)
224224
|> add_query_id(id)
225225

226226
push(socket, "doc", result)
227-
handle_continuation(socket, next_continuation, id)
227+
handle_continuation(socket, next_continuations, id)
228228

229229
{:ok, %{result: result}, _phases} ->
230230
push(socket, "doc", add_query_id(result, id))
@@ -245,15 +245,15 @@ defmodule Absinthe.Phoenix.Channel do
245245

246246
defp add_query_id(result, id), do: Map.put(result, :queryId, id)
247247

248-
defp handle_subscription_continuation(continuation, topic, socket) do
249-
case Absinthe.Pipeline.continue(continuation) do
248+
defp handle_subscription_continuation(continuations, topic, socket) do
249+
case Absinthe.Pipeline.continue(continuations) do
250250
{:ok, %{result: :no_more_results}, _phases} ->
251251
:ok
252252

253253
{:ok, %{result: result}, _phases} ->
254254
socket = push_subscription_item(result.data, topic, socket)
255255

256-
case result[:continuation] do
256+
case result[:continuations] do
257257
nil -> :ok
258258
c -> handle_subscription_continuation(c, topic, socket)
259259
end

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%{
2-
"absinthe": {:git, "https://github.com/circles-learning-labs/absinthe.git", "27441d036539124461430c9ca2b888f7301a9a9e", [branch: "subscription-prime"]},
2+
"absinthe": {:git, "https://github.com/circles-learning-labs/absinthe.git", "b0cd04ede7fe4b1e1ab9f177106d28a3c4d84a63", [branch: "subscription-prime"]},
33
"absinthe_plug": {:hex, :absinthe_plug, "1.5.0", "018ef544cf577339018d1f482404b4bed762e1b530c78be9de4bbb88a6f3a805", [:mix], [{:absinthe, "~> 1.5.0", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.2 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "4c160f4ce9a1233a4219a42de946e4e05d0e8733537cd5d8d20e7d4ef8d4b7c7"},
44
"decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"},
55
"earmark": {:hex, :earmark, "1.4.4", "4821b8d05cda507189d51f2caeef370cf1e18ca5d7dfb7d31e9cafe6688106a4", [:mix], [], "hexpm", "1f93aba7340574847c0f609da787f0d79efcab51b044bb6e242cae5aca9d264d"},

0 commit comments

Comments
 (0)