Skip to content

Commit

Permalink
Fix spec for pco/?
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkerlucio committed Jun 12, 2024
1 parent 2d9d1cf commit a727e33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/com/wsscode/pathom3/attribute.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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?))
2 changes: 1 addition & 1 deletion src/main/com/wsscode/pathom3/connect/operation.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit a727e33

Please sign in to comment.