(generate-fn schema opts)
Call with an (uncompiled) lacinia schema to return a function which can generate data for an arbitrary query
Opts are as per lacinia-gen.core/generator
e.g. (let [f (generate-fn {:objects {:team ... }})] (f "query { teams { teamName } }" {}))
Call with an (uncompiled) lacinia schema to return a function which can generate data for an arbitrary query Opts are as per lacinia-gen.core/generator e.g. (let [f (generate-fn {:objects {:team ... }})] (f "query { teams { teamName } }" {}))
(generate-query schema query variables opts)
For use with literal schema, query and variables arguments
Opts are as per lacinia-gen.core/generator
e.g. (generate-query {:objects {:team ... }} "query { teams { teamName } }" {} {})
For use with literal schema, query and variables arguments Opts are as per lacinia-gen.core/generator e.g. (generate-query {:objects {:team ... }} "query { teams { teamName } }" {} {})
(generate-query* schema query variables opts)
For use from Clojurescript where arguments are symbols that need resolving.
N.B. you must use defquery to define queries in Clojurescript as the value cannot be resolved from a normal var.
Opts are as per lacinia-gen.core/generator
e.g. (require '[my.project.graphql :refer [schema]]) (defquery team-query "query { teams { teamName } }")
(generate-query* schema team-query {} {})
For use from Clojurescript where arguments are symbols that need resolving. N.B. you must use defquery to define queries in Clojurescript as the value cannot be resolved from a normal var. Opts are as per lacinia-gen.core/generator e.g. (require '[my.project.graphql :refer [schema]]) (defquery team-query "query { teams { teamName } }") (generate-query* schema team-query {} {})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close