Skip to content

Commit

Permalink
apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
1e16miin committed Nov 4, 2024
1 parent f302994 commit 0bc69fe
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/com/walmartlabs/lacinia/schema.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
[clojure.pprint :as pprint]
[com.walmartlabs.lacinia.selection :as selection])
(:import
(java.net URL)
(clojure.lang IObj PersistentQueue)
(java.io Writer)
(java.util.concurrent Executor ThreadPoolExecutor TimeUnit LinkedBlockingQueue ThreadFactory)))
Expand Down Expand Up @@ -290,11 +289,11 @@
([message data]
(merge {:message message} data)))

(defn url?
[url]
(defn valid-url? [s]
(try
(URL. url)
true
(let [uri (java.net.URI. s)]
(.toURL uri)
true)
(catch Exception _ false)))

;;-------------------------------------------------------------------------------
Expand Down Expand Up @@ -405,7 +404,7 @@
:var var?))
(s/def ::parse ::parse-or-serialize-fn)
(s/def ::serialize ::parse-or-serialize-fn)
(s/def ::specified-by url?)
(s/def ::specified-by valid-url?)
(s/def ::scalar (s/keys :opt-un [::description
::directives
::specified-by]
Expand Down

0 comments on commit 0bc69fe

Please sign in to comment.