From a727e33daf002506bf726e71a42685e68c975f3b Mon Sep 17 00:00:00 2001 From: Wilker Lucio Date: Wed, 12 Jun 2024 15:02:19 -0300 Subject: [PATCH] Fix spec for pco/? --- src/main/com/wsscode/pathom3/attribute.cljc | 3 +++ src/main/com/wsscode/pathom3/connect/operation.cljc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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]