Skip to content

Commit

Permalink
Make updates for Pedestal 0.7.0-beta-x
Browse files Browse the repository at this point in the history
  • Loading branch information
hlship committed May 18, 2024
1 parent f424e8b commit 172980b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
## 1.3 -- UNRELEASED

Bumped many dependencies to latest.
*BREAKING CHANGES*

Bumped Pedestal dependency to 0.7.0-beta-1.
Function `com.walmartlabs.lacinia.pedestal.subscriptions/listener-fn-factory`
was renamed to `subscription-websocket-endpoint`, and its behavior and options
have changed. Fortunately, most Lacinia applications only use this function
indirectly, via `com.walmartlabs.lacinia.pedestal2/enable-subscriptions`, which
hasn't changed.

Other changes:

* Bumped many dependencies to latest
* Bumped Pedestal dependency to 0.7.0-beta-1

## 1.2 -- 23 Jun 2023

Expand Down
4 changes: 1 addition & 3 deletions src/com/walmartlabs/lacinia/pedestal/internal.clj
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,4 @@
(defn add-subscriptions-support
[service-map compiled-schema subscriptions-path subscription-options]
(assoc-in service-map [::http/websockets subscriptions-path]
;; TODO: Rename it because it doesn't reflect what it now does, maybe
;; `subscription-websocket-map`?
(subscriptions/listener-fn-factory compiled-schema subscription-options)))
(subscriptions/subscription-websocket-endpoint compiled-schema subscription-options)))
6 changes: 2 additions & 4 deletions src/com/walmartlabs/lacinia/pedestal/subscriptions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,9 @@
execute-operation-interceptor])


(defn listener-fn-factory
(defn subscription-websocket-endpoint
"A factory for the websocket endpoint map.
`listener-fn-factory` is no longer an accurate name and may change in the future.
This function is invoked for each new client connecting to the service.
`compiled-schema` may be the actual compiled schema, or a no-arguments function
Expand Down Expand Up @@ -581,7 +579,7 @@
:on-text on-text
:on-error on-error))))

(s/fdef listener-fn-factory
(s/fdef subscription-websocket-endpoint
:args (s/cat :compiled-schema ::spec/compiled-schema
:options (s/nilable ::listener-fn-factory-options)))

Expand Down

0 comments on commit 172980b

Please sign in to comment.