Skip to content

Commit

Permalink
should fix gen class compilation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cyppan committed Oct 18, 2016
1 parent 2734a23 commit b154987
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
[ring/ring-json "0.4.0"]
[clj-http "2.2.0"]
[com.graphql-java/graphql-java "2.1.0"]]
:main grape.core
:aot [grape.graphql.GrapeTypeRef]
:aot [grape.graphql.GrapeTyperef]
:plugins [[rfkm/lein-cloverage "1.0.8"]]
:profiles {:repl {:main dev}
:dev {:dependencies [[org.clojure/tools.namespace "0.2.11"]
[org.slf4j/slf4j-simple "1.7.21"]]
:source-paths ["dev"]}
:uberjar {:aot :all}})
:uberjar {:aot [grape.graphql.GrapeTyperef]}})
2 changes: 1 addition & 1 deletion src/grape/graphql/GrapeTyperef.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns grape.graphql.GrapeTypeRef
(ns grape.graphql.GrapeTyperef
(:gen-class
:main false
:extends graphql.schema.GraphQLTypeReference
Expand Down
8 changes: 4 additions & 4 deletions src/grape/graphql/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"node" doc})
_documents)}))))

(defn type-ref-data-fetcher [^grape.graphql.GrapeTypeRef grape-type-ref & {:keys [many?]}]
(defn type-ref-data-fetcher [^grape.graphql.GrapeTyperef grape-type-ref & {:keys [many?]}]
(let [[name type resource-key field] (.state grape-type-ref)]
(batched-data-fetcher
(fn [{:keys [resources-registry] :as deps} request ^DataFetchingEnvironment env]
Expand Down Expand Up @@ -281,17 +281,17 @@
(defn type-ref [{:keys [resources-registry] :as deps} resource v]
(cond
(resource-embedded? v)
(grape.graphql.GrapeTypeRef. (-> (get resources-registry (:resource-key v))
(grape.graphql.GrapeTyperef. (-> (get resources-registry (:resource-key v))
:grape.graphql/type
name)
:embedded (:resource-key v) (:field v))
(resource-join? v)
(grape.graphql.GrapeTypeRef. (-> (get resources-registry (:resource-key v))
(grape.graphql.GrapeTyperef. (-> (get resources-registry (:resource-key v))
:grape.graphql/type
name)
:join (:resource-key v) (:field v))))

(def type-ref? (partial instance? grape.graphql.GrapeTypeRef))
(def type-ref? (partial instance? grape.graphql.GrapeTyperef))

(defn resource->output-graphql-type [{:keys [resources-registry] :as deps} resource
& {:keys [skip-hidden? skip-read-only?]
Expand Down

0 comments on commit b154987

Please sign in to comment.