diff --git a/CHANGELOG.md b/CHANGELOG.md index 0234a98a..42bb6738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Idents run in parallel when using parallel processor (issue #208) - Fix wrong input order on nested resolvers (issue #205) - Fix `pf.eql/map-select` case on map container at query +- Fix spec for `pco/?` ## [2023.08.22-alpha] - BREAKING: `::p.error/missing-output` is now converged to `::p.error/attribute-missing` (issue #149) diff --git a/src/main/com/wsscode/pathom3/attribute.cljc b/src/main/com/wsscode/pathom3/attribute.cljc index 7e46600a..28c477d5 100644 --- a/src/main/com/wsscode/pathom3/attribute.cljc +++ b/src/main/com/wsscode/pathom3/attribute.cljc @@ -5,4 +5,7 @@ [com.fulcrologic.guardrails.core :refer [<- => >def >defn >fdef ? |]])) (>def ::attribute keyword?) +(>def ::parameterized-attribute (s/and seq? (s/cat :attr ::attribute :params (s/? ::params)))) +(>def ::attribute-maybe-parameterized (s/or :plain-attr ::attribute :parameterized ::parameterized-attribute)) + (>def ::attributes-set (s/coll-of ::attribute :kind set?)) diff --git a/src/main/com/wsscode/pathom3/connect/operation.cljc b/src/main/com/wsscode/pathom3/connect/operation.cljc index 6e02ce08..2c5adc8c 100644 --- a/src/main/com/wsscode/pathom3/connect/operation.cljc +++ b/src/main/com/wsscode/pathom3/connect/operation.cljc @@ -128,7 +128,7 @@ (>defn ? "Make an attribute optional" [attr] - [::p.attr/attribute => any?] + [::p.attr/attribute-maybe-parameterized => any?] (eql/update-property-param attr assoc ::optional? true)) (>defn operation-config [operation]